Skip to main content
All CollectionsOptimizations
How to check and reduce your website's disk usage
How to check and reduce your website's disk usage

How to optimize the disk usage of your website

Karl avatar
Written by Karl
Updated over 6 months ago

At Templ, you can temporarily exceed the disk space included in your plan. However, if your usage remains over the limit for more than seven days, an automatic upgrade will be triggered.

Note: If you exceed 100% disk overage, you will not receive additional space and your site may stop functioning.

This article will guide you on how to check your disk usage and provide tips to reduce it.

Optimizing disk space isn't always necessary; you may prefer to pay for extra disk space for convenience, avoiding the need for ongoing monitoring.

Checking disk usage in the Templ Panel

To check the disk usage in the Templ Panel:

  1. Navigate to Websites.

  2. Click on the website you want to check the disk usage for.

  3. The included and available disk space is displayed under Storage.

Check disk usage in WP Admin

With the release of WordPress 5.2, a new built-in tool called "Site Health" was introduced. This tool allows you to check the size of your WordPress directories and database.

To check disk usage in your WordPress dashboard:

  1. Navigate to Tools in the sidebar.

  2. Select Site Health.

  3. Click on the Info tab.

  4. Find the Directories and Sizes section.

Here, you will find detailed information about your site, including:

  • WordPress directory size

  • Uploads directory size

  • Themes directory size

  • Plugins directory size

  • Database size

  • Total installation size

How to reduce disk space

There are several ways to reduce your disk space usage. Here are the methods that can have the largest impact:

  • Remove backups you don't need anymore

  • Check and clear the debug.log file

  • Remove or reduce the size of large files

  • Host videos off site

  • Clean database

Remove backups you don't need

How to check and remove local Templ backups

At Templ, your websites are automatically backed up remotely every day, and the space for these backups is not counted towards your disk space. However, if you choose to make a manual local backup, it will be stored on the same server as your website and will count towards your disk space usage. Here’s how to check and remove local backups:

  1. Navigate to Backups

  2. Click on the website you want to check backups for. Any local backups will be displayed at the top.

If you want to remove a backup:

  1. Click Edit below the list of backups

  2. Click Delete next to the backup you want to delete

  3. Click Continue below the list of backups

How to check and remove backups created using a WordPress plugin

Many WordPress plugins allow you to create and manage backups directly from the WP-admin dashboard. By accessing the plugin’s settings or backup management page, you can find and remove any unnecessary backups, freeing up disk space.

How to clear WordPress debug.log

The debug.log file stores debug information, including errors, warnings, and notices generated by WordPress core, themes, and plugins. Over time, this file can accumulate significant data and take up substantial space. To check and clear the debug.log file:

If there is a debug.log file, you will find it there. If the file takes up significant space, you can delete it. By deleting this file, you will remove some historical error data, but it is not required for the website to function properly, so it is safe to delete.

Identify and remove or reduce the size of large files

Large files, such as high-resolution images, videos, and unused media, can quickly consume your available disk space. Here are steps to identify and remove large files.

Remove large media files

The wp-content/uploads directory in WordPress stores media files like images, videos, and documents uploaded through the WP-admin Media Library. It can contain unused files that you can remove in order to reduce disk space.

  1. Navigate to the wp-content/uploads directory

  2. Review your uploaded media files and delete those that not are being used.

Advanced Tip: Identifying large files and directories

This command helps identify large files and directories for cleanup or further inspection by showing those over 10MB and sorting them from largest to smallest.

du -ch --threshold=10MB --all --separate-dirs . | sort -rh

Reduce the file size of large images

After removing the files you don't need, you may want to optimize the remaining files.

Several WordPress plugins can optimize images uploaded to the media library. However, performing image optimizations directly on the server is often much faster and more efficient. For detailed instructions, see our article on How to perform image optimizations directly on the server using jpegoptim and optipng.

Host Videos Off-Site

Videos are large files that can quickly consume your disk space. By hosting them on services like YouTube or Vimeo, and embedding them on the website, you can free up significant space on your server.

Clean Database

Over time, databases can accumulate unnecessary data such as thrashed posts and revisions.

The easiest way to clean the database and experience the difference in performance is to use the Templ Optmizer plugin.

Note! Always back up your database before making any changes to your site’s database.

If you want tips on how to reduced the disk space on your website, don't hesitate to reach out. Contact us by clicking on the chat-icon in the lower right of this page.

Did this answer your question?