Use this simple WP-CLI command:
wp db size --tables
It shows the size of your WordPress database along with the size of individual tables.
This is especially useful when troubleshooting slow sites, large databases, or before migrating a WordPress website.
To see just the total database size:
wp db size
A simple command that can save you time when doing WordPress maintenance!
> wp db size --tables
> wp db size
Tested on
WordPress 7.1.1
PHP 8.2.29
Reported by the author on September 29, 2026. WPFolks has not verified this.