7 ways to check file usage in WordPress

There is no such thing as Drake's unlimited disk space or bandwidth when it comes to web hosting. Shared WordPress servers often advertise this but there is a limit behind the scenes if you read their terms of service (TOS).

Over time, your WordPress site can grow quite quickly and eventually, you can reach your limit, whether it's 5 GB or 20 GB.

So today we are going to share with you a few ways to check disk usage in WordPress so you can clean your web pages.

Your website grows bigger every day. Here are 7 easy ways to check storage usage in WordPress.

Calculate the size usage in WordPress

File on server

WordPress files taking up disk space include things like:

  • Images and videos are uploaded to your media library (usually in / wp-content / uploads /)
  • Theme files and plugins (PHP, CSS, JS) (usually in / wp-content / themes / and wp-content / plugins /)
  • WordPress core (your main WordPress installation file) (usually in the public_html root directory or directory)
  • Any file uploaded via FTP (such as custom web fonts, libraries, etc.)

MySQL database file

Your WordPress MySQL database file stores all information on your WordPress website, such as post data, page data, meta information, plugin settings, users, login information, etc.

7 ways to calculate the amount of space used for WordPress

A lot of WordPress servers are managed like Kinsta do not use cPanel and have separate integration reports to see resource usage for your site. And they don't always give you the data you need. Suppliers often focus on an overview and less on the level of detail. Although some have detailed reports via CSV. So this is where the following methods can be useful to get more information about disk usage, for both your files and your database.

1. Check disk and database usage with Site Health Tools

With the release of new versions of WordPress, a new tool has been integrated into the core called Website Health. It is actually quite amazing and includes a lot of useful data about your WordPress site and server. With it, you can check the size of your WordPress folders and databases.

In your WordPress dashboard, browse to Tools → → Site health → Information. In the Directory and Size tab of the Tag, you'll find the following information about your website:

  • WordPress directory size
  • Upload directory size
  • Thread directory size
  • Plugin directory size
  • Database size
  • Total installation size
WordPress Health Health tool directory and size

WordPress Health Health tool directory and size

2. Check database size with WordPress Plugin

Perhaps you are looking to see more detailed data about your WordPress database size? For example, just knowing the total size will not be useful if you are trying to determine what is taking up space in the database. That is where the plugin is Advanced Database Cleaner may be useful. Basically it is a tool to analyze and clean up your database. There are both free and premium versions.

Plugin Advanced Database Cleaner

Plugin Advanced Database Cleaner

When writing this article, it has more than 50,000 active installs with an impressive 5 out of 5 stars rating. You can download it from WordPress repository or by searching it in your WordPress dashboard in the Add Add New add-on.

After installation, you can click WP DB Cleaner in your WordPress dashboard and then click on the Table Tables tab. There is a lot of optimization you can do with this plugin but we won't dive in today, we are interested in discovering what is using the most space in our database. friend.

Usually database tables will be named similarly to the name of the plugin they are used to. Immediately, we were able to uncover database waste. For example, the ab ab abpress_optimizer tables ‘used by the AB Press Optimization plugin are no longer used on the site we are analyzing. Also, tables Wikipedia's icl_translations Used by WPML plugin to install multiple languages. However, this website is not multilingual.

A lot of times the plugin is installed and then removed but the database tables are left behind. You can usually safely delete them from your database (we will go into this more deeply in the phpMyAdmin step below). Remember to always back up your database first. If you are uncomfortable doing this, we recommend talking to the developer.

Database waste

Database waste

One downside of the Advanced Database Cleaner plugin is that you cannot sort rows by data size.

Another big board we noticed is the tve_leads table. This is used by the popular Thrive L plugin. However, the website in question did not use this plugin. So again, if you check your WordPress site, you'll probably find lots of leftover tables that need to be cleaned or deleted.

Table thrives

Table thrives

Not sure which plugin belongs to which plugin? In a lot of cases, a simple Google search will reveal the answer.

Google searches the WordPress table

Google searches the WordPress table

You can also see the total database size in the Advanced Database Cleaner plugin in the Overview & Settings tab of the king.

The total database size in the plugin

The total database size in the plugin

3. Check database size with phpMyAdmin

You can also check your database size and analyze your tables with phpMyAdmin. Many servers will have a shortcut to access this in your control panel or perhaps a link in your setup email.

Access WordPress phpMyAdmin

Click on your database on the left. You can then sort your database tables by size.

Database phpmyadmin

Database phpmyadmin

On the WordPress site we analyzed, more than 70% of large database tables (except for the core) created by plugins are no longer used on the site. That means our database is using more disk space than necessary. The older your site is, the more data you'll be left with.

You can easily delete these unused tables by selecting them and selecting the Drop Drop style from the drop down menu. However, we always recommend backing up your database before doing this. Check out our quick and easy guide on how to back up your MySQL database with phpMyAdmin.

Drop tables in phpMyAdmin

Drop tables in phpMyAdmin

4. Check disk usage and database size in cPanel

If your server uses cPanel , you can easily get an overview of your MySQL disk and database usage in the sidebar.

Overview of cPanel disk usage

Overview of cPanel disk usage

You can also drill down into disk usage reports for more detailed data. Simply click use Disk Disk on the network.

use cPanel disk

use cPanel disk

At the bottom of the screen, you can then drill down into folders and arrange them according to disk usage.

Drill down cpanel using disc

cPanel drills down using disk

Another way to see the size of your MySQL database is to click on the MySQL MySQL Database in the Database.

MySQL cPanel database

MySQL cPanel database

Then, according to the current database, it will show you the total size of the database.

MySQL cPanel database size

MySQL cPanel database size

5. Ask your hosting provider

Another way to check your current disk space usage and database size is to ask your server to provide you with a report. A lot of times hosting providers can quickly run server commands to generate tree / detailed reports on directories to show you what's taking up the most space. It may not always be the best report, but it will give you the data you need. A host should always be willing to assist you in finding ways to clean up unused data, as this is beneficial for both.

It is important to know if your host includes your staging web sites as part of your total disk usage.

6. Going into local disk usage

Another way to analyze your WordPress disk usage is to drill down into local data on your computer. This can be done in two different ways:

  • Option 1: Download a full archive backup of your website from the hosting provider's control panel.
  • Option 2: Connect via SFTP and download your entire website. Or in most cases you will just need / wp-content /your directory. Depending on the size of your website and internet connection, this may take a while.

So we do not recommend doing this all the time, perhaps every 6 months. Or if you have a smaller website, this probably won't matter.

Although this method is more time consuming, it can be one of the most powerful ways to analyze your disk usage, because you can analyze data very quickly and use a tool you choose. You can use a directory size tool to analyze your website.

For Window

For Windows, we appreciate it TreeSize software Free that we will use in this example.

You can choose / wp-content /The folder you downloaded and it will quickly scan it to show you the exact size of everything in it. As you can see below, this is much better than any plugin or export from your server. If you analyze data locally, you can really take advantage of some powerful tools like this.

The wp-content directory tree

Content wp directory TreeSize

If we narrow down to the large directory in the uploaded files, we can see right away that there are some very large images / photos that have been uploaded that are probably not optimized. A mind-blown.gif is just over 3.5 MB, too big for an optimized image. There are several easy ways to compress animated GIFs that should be done here.

Large images take up disk space

Large images take up disk space

Be sure to check out our in-depth article on how to optimize images for the web. TreeSize is great for quickly learning your site and detecting problems in seconds.


For Mac, you might want to check out OmniDiskSweeper . It's free and you can easily scan your wp-content / directory and find the large files that are taking up the most space on your site.

Large files in the wp content directory

Large files in the wp content directory

7. Check disk usage via SSH

The final and final way to analyze your disk usage is via SSH. Although this is probably for more tech savvy people, we think we will still include it, since it's quite easy to do. Just log in to your server via SSH. Then use the following commands. The first will navigate you to your wp content directory using the Change directory (()) command. Note: This location may vary on certain servers.

public cd / wp-content

You can then use the following command to sort the directory with the smallest files at the top and the largest at the bottom.

du -sh * | Sort

You can drill down as much as you need (using the same commands) until you find what is taking up the most space on your site. In this case, it is our upload directory.

Check SSH disk usage

Check SSH disk usage

As you can see below, our 04 (April) 2016 folder is taking up more space than other months and years.

Large SSH directory

Large SSH directory

After going into that directory, we realized that it was due to some very large GIF and PNG being used. We recommend trying to keep your images below 100 KB.

Large SSH files

Large SSH files

Reduce disk usage in WordPress

Here are a few quick and simple suggestions to reduce disk usage on your WordPress site.

  • Optimize your image. Try to keep your images under 100 KB.
  • Use a plugin like Media Cleaner to remove unused vehicles on your site.
  • Delete old themes and plugins.
  • Clean up unused database tables left behind from plugins that are no longer in use. Check out our in-depth article about auto-loading data.
  • Check your WordPress installation using some of the tips above to make sure there are large files.
  • Disable or limit WordPress modifications to keep your database small.
  • Delete the old log files.
  • Remove backup files and store them externally.
  • Clean up and delete comments in spam or junk


As you can see, there are quite a few different ways to check your disk usage and database size in WordPress, even for those who are not tech-savvy. Remember that over time, you may have accumulated a lot of bloat on your site, including files and tables in your database. Testing every 6 months can be a good way to ensure you keep disk usage to a minimum, reduce storage costs and help speed up your website.

About My name is Nguyen Manh Cuong. I was born in a poor village in Ba Vi district, HA NOI province - windy and sunny land. Currently. https://www.nguyendiep.com/. Mr Cuong.
Newer Posts Newer Posts Older Posts Older Posts


Post a Comment