Steps to know the Size of the Website Database

Steps to know the Size of the Website Database

Today, in our digital-driven society, data is king. Learning how to research and analyze data can help grow a business. All websites have some data, whether it be in the form of text or images. Owning a website and managing its database is essential to understand the content that drives your business. In today's blog post, we'll outline four ways to determine your database's Size.

You can do this in one of the following ways.

1. MySQL Database

2. PhpMyAdmin

3. WordPress Dashboard

4. SSH using the command

Before continuing, be sure to enter the name of your database if you have a database that is related to your WordPress website, then.

Step 1: Log in to cPanel and enter the File Manager section.

Step 2: Get into your WordPress installation directory. You will get a list of all your WordPress files and directories on the right side.

Step 3: Search for the wp-config.php file, right-click over it, and View.

Step 4: Go down to the line that says:-

Code:
// ** MySQL settings – You can get this info from your web host ** //
Step 5: After this point, you will learn how to use your database.

Now, let’s examine the methods in detail.

Ways to check the size of your website Database

Using MySQL Database

Step 1:
Go to the MySQL® Databases section of your cPanel account.

Step 2: Now, In the Current Databases section, you will find a list of all your databases.

Step 3: The Size of the entire database is listed under Size.

Using phpMyAdmin

Step 1:
Go to the cPanel feature list page, and click on phpMyAdmin under Databases

Step 2: On the next page. The list of all the databases is on the left panel. Choose the one that you want more information about.

Step 3: The right side of the screen will display all tables in the database and their Size.

Step 4: The total number of tables on a page is indicated at the bottom.

For a WordPress website, you can check the database size from within the admin area of your site. First, let's look at the procedure step by step.

Through WordPress Dashboard

Step 1:
Sign in to the WordPress dashboard.

Step 2: On your dashboard's right side, click on Site Health Screen.

Step 3: In the Info tab, you can view information about your website.

Step 4: Go to the Directories and Sizes section, and click on the drop-down button at its right.

Step 5: The database size is next to the Database Size option.

You can also check the size of your database via SSH command if you have SSH access.

By SSH using the command

Step 1:
Log into your server with the proper username and password.

Step 2: Now, write the following keys to switch to the MySQL prompt

Code:
MySQL -u username -p

#Replace username with your account name
Step 3: You will be prompted to enter your password. Type it, and the MySQL prompt will appear.

Step 4: Use the following command to check the size of all databases.

Code:
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;
Step 5: To get a list of all tables in your database, execute the following command:

Code:
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;

#Replace database_name with the name of your website's database.
Data is real money in this century. Today this article will help you to know the size of databases in 4 different ways.
Author
kumkumsharma
Views
133
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top