How to check size of website database?

You can check the size of websie database to know if there is unnecessary consumption of disk storage. You can do the same by one of the below given methods.

#1. From MYSQL Database

  • Login to your cPanel account and go inside MySQL® Databases.
  • On the next page, scroll down to Current Databases section where all your database will be listed.
  • Under the Size option, size of all the database is mentioned.

#2. From phpMyAdmin

  • From the cPanel feature list page, select phpMyAdmin under Databases section.
  • On the next page, list of all your database will appear on the left panel list.
  • On the right side, you will find all the tables of the selected database with their size.
  • The total size of all the tables on a page is given at the bottom.

#3. From WordPress Dashboard

  • Login to WordPress dashboard.
  • On the right side, under Site Health Status click over Site Health Screen.
  • On the next page, move to Info tab where you will find information related to your WordPress website.
  • Scroll down to Directories and Sizes section and click over the drop down button.
  • Size of the database is given next to Database Size option.

#4. From SSH command

  • Login to SSH with required credentials.
  • Now, type the following command to switch to mysql prompt.
mysql -u username -p
  • It will ask for the password as Enter Password. Type the password and then mysql> prompt will appear.
  • To check the size of all the databases, use the following command.
SELECT table_schema AS "Database", 
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" 
FROM information_schema.TABLES 
GROUP BY table_schema;
  • Now, to check the size of each table in a database, copy and paste the following command.
SELECT table_name AS "Table",
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.TABLES
WHERE table_schema = "database_name"
ORDER BY (data_length + index_length) DESC;

It will give the output including the name and size of all the tables related to particular database.

To learn the in detailed procedure to check the size of website database, read the blog.
  • how to check the size of website database in phpMyAdmin section, how to find the size of website database from WordPress dashboar, how to analyze the website database size, how to check the website database, how to find the size of website database via SSH, how to check the size of website database via MySQL Database sec, how to get check the size of website database
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install WordPress in Sub-Directory?

Login to cPanel. Select Softaculous Apps Installer from Software section. Select WordPress...

How to Restore Backups Using JetBackup 4 in cPanel?

Login to cPanel and get inside JetBackups section. Here, you will find multiple features which...

How to Suspend Outgoing Emails of a cPanel Account as WHM Reseller?

To manage the bulk mailing that occurred from a cPanel account hosted within your WHM Reseller,...

How Can You Create/Install WordPress On Sub-Domains?

#1. Create a subdomain of your main domain Log into your cPanel and go to the Subdomains...

How to disallow a particular directory from being crawled by Google?

Login to your cPanel Go inside File Manager Click on public_html Create a robots.txt file....