How to reduce the number of Inodes your WordPress website uses?
If you are just launching your first WordPress website, you should also read my guide on how many Inodes a new website needs.
For everyone else, here’s a list of factors with the biggest influence on the number of Inodes your WordPress website uses, along with advice on how to reduce this usage.
As a reminder, each file and folder on your hosting server will occupy one Inode.
Recommended: cheap hosts with high Inode limits
|Inodes||Starting price||Money-back||Disk Space|
3 200 000
$3.45 / mo.
$2.96 / mo.
#1: Installed WordPress themes
Every WP theme you install uses up a certain number of Inodes.
Depending on how sophisticated and feature-rich the theme is, it could occupy anywhere from a few dozen to a few thousand Inodes.
Note that if you disable a theme but don’t delete it, it will still use up Inodes because its files will still be residing on your server.
- Delete any unused and deactivated themes
- Only install and use themes from reputable developers – a poorly coded theme could unnecessarily comprise hundreds of files
#2: Uploaded images
This is a big one.
When you upload an image to WordPress, most themes will save that image in four different versions:
- Original image
- Medium-sized image
- Large-sized image
- Thumbnail-sized image
Some WordPress themes create even more versions with different stylings – up to 12 versions in some cases.
What’s important to realize is that each of the images above is stored on your server as a separate file and, as a result, uses up a separate Inode.
This can get out of hand quickly: for example, if each image you create is saved by your theme as four separate images (the most common scenario), and you have 500 blog posts with an average of 5 images per post, that’s 10,000 Inodes used by images alone.
- Delete unnecessary images. WordPress images are stored on your server under /wp-content/uploads. If you only ever use images with the original size, delete everything other than the original. This can be a lot of tedious work.
- Prevent your theme from creating Thumbnail/Medium/Large images if you don’t use them. To do that, log into your WordPress admin panel and navigate to Settings -> Media, then set the width and height to “0” (zero) for the image sizes you don’t the theme to create.
- Only install themes from reputable developers to avoid having to deal with a dozen variants for each uploaded image.
#3: Email accounts
Webmasters are often surprised to learn that their email boxes can account for a significant number of occupied Inodes.
Every email message in your account occupies an Inode because that email is stored on your hosting server as a file.
This includes messages in your Inbox, Spam folder, and Sent folder!
So if there’s an email account you used to send out thousands of emails as part of an email marketing campaign in the past and you didn’t purge your “sent” folder, that email account could be responsible for thousands of occupied Inodes.
Or, an email account that you haven’t used in a while could have accumulated hundreds or even thousands of messages in the spam folder over the years, occupying loads of Inodes in the process.
- Delete all unused email accounts
- Delete email messages that you no longer need (both in the Inbox and Sent folder)
- Purge your spam folder regularly
- You can also install a third-party email client and configure it to automatically delete emails from your server after they are downloaded to your desktop computer or smartphone. This way, you’ll be saving all your emails to your local device, effectively reducing the Inode footprint of your email accounts to zero.
#4: Caching plugins
Popular WP caching plugins, such as:
- WP Rocket
- WP Super Cache
- W3 Total Cache
Do a great job at speeding up your website and improving performance, but they also create a significant Inode footprint.
Clear your blog’s expired cache periodically. You can do so from your plugin’s settings page or by clicking the “Delete Cache” button at the top of the WordPress admin panel:
#5: Temporary (tmp) files
The tmp folder in the root of your server contains files that are created to temporarily store information that is briefly required by other applications.
Unfortunately, temporary files often remain on your server long after they’ve served their purpose. And they can use up a lot of Inodes.
- Contact your hosting provider and ask which tmp files can be safely deleted, then delete them.
- Set up a cron job to periodically purge the tmp folder.
#6: Log files
Log files contain a record of past activities that have occurred on your server.
Depending on what applications are installed on your server, the logs folder in the root of your server can contain more or fewer files.
In my case, the logs folder only contains three files (and therefore occupies 3 Inodes). However, it’s not unusual for it to contain hundreds of files.
Delete all the log files in your logs folder. Before you do that, make sure to download and store the logs on your computer – while unlikely, it’s possible that you may find them useful in the future.
#7: Installed WordPress plugins
Any WP plugin you install will use up Inodes.
Luckily, most plugins are made up of no more than a few dozen files, so if you’re trying to cut down on Inode usage, it’s unlikely that deleting plugins will make a big difference.
Still, if you have dozens of unused & disabled plugins, it’s a good idea to delete them.
Advice for beginners and closing thoughts
If you are a new webmaster, you shouldn’t worry much about Inodes. Inode limits at most hosting providers are generous enough that beginners are highly unlikely to run into any issues during their first few years of operating a website.
However, do keep an eye out on your email accounts, particularly if you do email marketing campaigns or receive a lot of spam – inadequately managed email boxes can easily use up tens of thousands of Inodes in a relatively short amount of time.
If you are moving your website(s) from an old host to a new one, make sure to:
- Check how many Inodes your existing websites are using (you can do that in cPanel or by asking your current host)
- Check the Inode limit at the new hosting company you plan to move to – either by reading my reviews or by contacting the host directly
Best of luck!