Skip to content

How to free up disk space and reduce Inode Usage in WordPress

Every website created with a content management system (CMS) like WordPress takes up server space. WordPress depends on files and folders stored on the server, which are represented by inodes. Sometimes, especially as the site grows and its content grows, it can happen that the server space occupied and the number of inodes used exceeds the available resources. In these situations, it's important to know how to free up disk space and reduce inode usage. Below are some ways to deal with this issue in WordPress.

Remove unnecessary templates and plugins

We often have plugins and templates installed on our WordPress sites that we don't use. Each takes up disk space and increases the number of inodes used.

Plugins and templates that are not used can be safely removed. This can be done by going to the WordPress admin panel and then to the “Plugins” or “Appearance” section. After selecting the appropriate option, you will see a list of all installed plugins or templates. Just select the ones you don't need and then click "Delete".

Clear the page cache

Caching is essential to website speed, but cache files can accumulate and take up a lot of disk space. Most WordPress caching plugins offer manual cache clearing. Plugins like “W3 Total Cacheor “WP Super Cache” have this option in their admin interface.

Delete old backups

Backups are essential for website security, but they can take up a lot of disk space, especially if stored locally. Make sure you delete old backups that are no longer needed.

Multiple backup plugins like “UpdraftPlus” or “BackWPup”, offers the option to delete old backups automatically.

Optimize your database

The next step may be to optimize your WordPress database. The database collects information about all entries, pages, comments, but also temporary data and old versions of entries.

Plug "WP Optimize” can automatically clean and optimize the database. Once installed and activated, you can configure the plugin to clean the database regularly.

Delete old media files

We often have old media files on the site that we no longer use. These may be images, videos or sounds that were used before but are now unnecessary. We can remove these files manually or with the “Media Cleaner” plug-in.

In WordPress, we can also change the settings to avoid generating too many versions of the same image. To do this, add the following code to your theme's functions.php file:

add_filter('intermediate_image_sizes_advanced', function($sizes) { unset($sizes['medium_large']); unset($sizes['1536x1536']); unset($sizes['2048x2048']); return $sizes; });

The solutions above should help you manage the disk space and number of inodes on your WordPress server. Regular monitoring and resource management will keep the site healthy and stable.

Check out the offer of 1500+ Premium WordPress plugins and themes!