The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · Bash / Shell

Need to quickly check how large your WordPress database is?

Shared by Krupal Panchal · September 29, 2026

6 views
1 upvote
Back to Snippets

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.

Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

1 comment

  1. Amit Dholiya
    Amit Dholiya @amitdholiya

    This is used to check your WordPress database size via WP-CLI — handy before migrations or when debugging a slow/bloated site.

    Report