If you are hosting your blog or website with Siteground, HostGator, or any other cPanel-based host and you have received a notification that your account is in jeopardy of exceeding your allocated inode usage quota, then this post is for you.
After reading the email from your host, if you are left scratching your head and wondering “what is an inode and how did I exceed my inode quota?” then you are not alone. It’s not a term that is used a lot, even by very technical bloggers.
NOTE: Siteground has made some changes to their hosting interface and Siteground cPanel is no more. They moved to a different Site Tools interface, but they are still monitoring inodes and they still send email warnings to those who exceed their limitations. The details below about what is inode usage and how to clear inodes still applies to Siteground, as well as those hosts that continue to use cPanel.
Inodes and WordPress can be particularly problematic because of the way WordPress handles the process of creating different sized versions of an image when they are uploaded. For that reason, WordPress users have to pay close attention to their inode usage quota, especially if you receive a notification from your host.
Not all hosts place a limit on inodes, some offer unlimited inodes in their hosting as a perk. Siteground and Hostgator, though, are two web hosts that are notorious for sending scary messages about turning off sites that exceed inode quotas.
Often, when you receive the notification that your account is going to exceed your inode allocation, it also comes with a link to upgrade your hosting for an additional cost. Some hosts don’t give you any instructions or tutorials on how to delete inodes in cPanel, they just want you to upgrade so they get more money each month.
Before you click that link and spend more money, read the information below to understand what inodes are, how they are created, and then follow the tips below to clean up your inode usage.
By doing this, you can ensure that your host won’t limit your account and you can save yourself some money.
NOTE: I have been contacted by quite a few folks recently about receiving notes from Siteground regarding their inode quota. While it has really always been part of their hosting packages, it appears that Siteground is starting to take inode overages more seriously and are cracking down. Siteground is well known for their outstanding customer support, so before you panic, reach out to them and let them know you are addressing the issue and then get started following the steps below to reduce your inode usage.
What Is An Inode Anyway?
Sometimes, those warnings from your host can be a little scary and confusing. They don’t really do a great job explaining the meaning of an inode usage quota and (I believe) the goal is to scare you with technical terms into upgrading your plan. Instead of doing that, it’s better to learn what the tech term is and then address the problem.
In this case, the term inode is just a fancy way of saying the word “object”.
If you want the full, technical definition from Wikipedia, here you go:
The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object’s data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.
Basically, any object that lives within the file structure for your website is consider within your inode quota.
For example, the files contained within the folder below account for 15 inodes. Notice that they were last modified in 2011, but they have been sitting on my server since. As a result, I decided it was time to delete them.
But evaluating your inode structure isn’t as easy as deleting a few files. In order to truly understand your inode usage and learn how to delete the inodes in cpanel, you have to understand more than just how many files are on your server, you also have to understand the folder structure.
What Is Inode Usage?
As an example to help you understand how inode usage is monitored, imagine that you were just setting up your website for the first time and you created the following file structure:
Basically, you have used 13 inodes toward your quota. 4 inodes for the folders, 6 inodes for the images, and 3 inodes for the videos.
NOTE: I recently received an email asking if I knew of a web host that allows unlimited inode usage. For others wondering about that, I don’t. I’m not sure I would want to be on a shared server with other sites that had unlimited inode usage. Even if you are a good steward and stay within reasonable inode limitations, there might be a photo site hosted on the same server that chews through inodes and causes unnecessary strain on the server. The result is that another site slows down your blog or website. So, rather than looking for a host that allows unlimited inode usage, it’s better to understand what inodes are, how to stay within your inode quota, and what steps to take if your inode limit is exceeded.
The more complex your folder structure is, the more inodes you’ll use. If your hosting offers unlimited inodes web hosting, then you don’t need to concern yourself about how many folders or files your create. Those of us who are limited by an inode quota have to be more cautious. We have to be able to identify unused images in WordPress and remove them in order to reduce our inode usage.
How Do I Know What My Inode Quota Is?
This one is a good question and it depends entirely on your host. Siteground, for instance, you have to dig a little bit to find out where the inode quotas are located. To see what I mean, follow these steps:
To see the inode hosting quotas for each Siteground WordPress plan:
- Visit https://www.siteground.com/features/wordpress-hosting.htm to see the comparisons of the Siteground plans
- Scroll down to the section entitled “We Allocate the Resources You Need”
- Hover over or click any of the “Premium” links on that page.
As you’ll see in the image below, the Siteground GrowBig hosting plan allows you to use up to 300,00 inodes.
So that means that you can have 300,000 files and folders in your file structure before Siteground will either limit your site or require you to upgrade to a bigger plan.
If you are on another cPanel-based host, you should be able to login to your cPanel and look at the inode widget that displays where your account stands with respect to inode usage. As you can see in this image, the account was in jeopardy of exceeding the inode quota.
Knowing your inode allocations can then help you know how many files/folders you are allowed to have. It can also help you avoid troubles where you host takes action against your account.
What Will My Host Do If I Exceed My Inode Allocations?
If you’re reading this post, it likely means that your host has sent you a nasty-gram letting you know that you are at risk of exceeding your inode usage and you either have to clean things up or upgrade to a bigger plan that allows for more inode allocation.
DO NOT IGNORE THESE EMAILS!
If you ignore the messages and don’t reduce your inode usage or upgrade, the host will throttle your site. At best, that means they will reduce the resources available to serve up your web pages and your users will start to see error message.
At worst it means they will turn off your site completely.
The message I received from Siteground looked like this.
As you can see, it details what percentage I have used, but it doesn’t really tell me how many I have used or how many I am allocated. While there are a few tips about reducing the inode usage, it doesn’t really help me investigate where the inode issues are located and how to resolve them.
That, I had to figure out on my own, so I’m sharing these tips to help you track down and resolve your issues without spending more money.
TIP: Maybe you’re thinking it’s just time to go ahead and upgrade your hosting. It’s a lot easier to just upgrade and pay a little more money and not have to worry about cleaning up your file structure, right?
Resist that temptation! If you upgrade, you haven’t solved the problem and it’s going to continue to cause problems. The next thing you know, you will have chewed through your bigger inode allocation and be right back reading this article.
Where Do The Issues With Inodes Usually Come From?
There are several places that can cause inode issues. They usually are situations where large numbers of files are being created and stored and never deleted. Places like:
- Plugins or themes that are deactivated but not deleted
- Caching plugins that create cache files like the Siteground SG Optimizer or Autoptimize
- Backup plugins that create a backup file each night on your server, but never delete them
- Image files for your blog posts (more details on this in a second)
- Upgrade files from WordPress, themes, or plugins that aren’t properly deleted
- Temporary files created by your server that aren’t deleted
There quite a few other ways that inode usage can creep up, but these are the most common ones that I have seen when troubleshooting this issue for my personal blogs or for my clients.
How Does WordPress Make Inodes More Challenging?
WordPress, while amazing for both blogging and business websites, is a relatively complex content management system. If you think about what WordPress allows you to do, it’s pretty amazing. Once you install the WordPress core and configure the primary settings, you can extend the functionality of the WordPress by:
- Adding a theme that suits your site design
- Enhancing the functionality of WordPress through plugins
- Upload images to your media library that can be reused throughout your content
While each of these capabilities is designed to create a central location to manage your blog or website, it can also cause issues. Inode issues can arise when you:
- Upload themes to try and test, but don’t ever delete the old themes that you don’t want.
- Don’t remove the themes that come with the WordPress core (do you really need to keep the Twenty Eleven theme?)
- Add plugins and keep them in deactivated state, but don’t delete them
- Upload images that you never intend to use on your site
Each of these activities consume storage on your web server and the files that are created by uploading a theme or plugin remain on your file system and each folder and file is considered to be an inode.
That means each of those outdated, unnecessary plugins and themes is counting toward your inode quota and can be causing issues.
The other challenge that is created by WordPress comes in the form of images. When you upload an image to the WordPress media library, the CMS creates a copy of that image in specific sizes that are required by your theme.
By default, WordPress creates 4 different sizes for each image:
- The original image in its native size
When you configure WordPress initially, you can set up the sizes that you need the different images to be under Settings > Media.
Some themes and plugins go beyond these four images sizes and allow the system to create custom image sizes. A theme could have unlimited custom image sizes, which can contribute to your inode issue.
For instance, suppose your theme developer added four additional custom image sizes. This means that every time you upload an image, not only are the standard four images created, but an additional four custom images are created and stored within your file system.
That means each time you upload an image, eight different files are created, using up 8 inodes. One image…eight inodes.
While that might not seem like an issue at first, imagine if you were operating an online business and had 2,000 items in your catalog. That means uploading 2000 images to WordPress would result in the creation of 16,000 inodes.
That could be a problem.
If you’re a travel blog or a DIY blog where you upload lots of images to show your travels or demonstrate how to craft an item, you might add 25 images to a blog post. Those 25 images would result in (25 x 8) 200 inodes being consumer for just one blog post. Not to mention the featured image for your post, which could consumer another eight.
The same issue arises if you are adding supplementary images, like pinnable images that just serve the purpose of sharing the post on Pinterest. Even though you don’t need the other sizes that are created by WordPress, they are created anyway.
As you can see, understanding how your theme creates images is an important way to ensure that your theme isn’t contributing to your inode issue.
How Do I Identify Where High Inode Usage Is Occurring?
If you know that you are at risk of exceeding your inode quota, then the first thing to do is determine where the bulk of your files are being stored. Most cPanel-based hosts provide a disk space usage tool that you can use to analyze your current storage use.
In the image below, you can see that most of the files in this instance are stored in the public_html/ folder. That makes sense because that’s where all of my WordPress site files are currently stored.
Unfortunately, that doesn’t do me a whole lot of good.
Below that report, though, there is a second tool that allows you to expand the folder structure to see which specific folders are causing the issue. As you can see in the image below, the wp-content/cache, wp-content/plugins, and wp-content/themes folders are all using a good amount of storage space.
It’s the wp-content/uploads folder, however, that is really taking up a lot of storage space on the server, though. The question is whether those are unused images in WordPress that were either created by the theme settings or just were never included in a post.
NOTE: One thing that you need to understand is that just because a folder is using a lot of storage, doesn’t necessarily mean it is causing your inode usage problem.
For instance, if you were to upload a long, high-resolution video to your site it might use up 100MB in storage, but only a single inode. Inode issues and storage issues are often intertwined, meaning that a lot of files are using up both inodes and storage, but it isn’t always true.
In this case, the uploads folder was the first place I went hunting to determine whether this was causing the issue. Because this site is an eCommerce site with thousands of products, my instinct was that the uploads folder was consuming a lot of inodes and the best thing to do was to clean up the media library.
What Can I Do To Reduce My Inode Usage?
Ok, so you have an idea as to where your inode usage might be occurring, the next step is to identify ways to reduce your inodes so you don’t go over your allocated quota. Here are the steps I would recommend taking, in this specific order.
The reason I recommend this order is it starts with the easiest things you can do to clean up your WordPress site and then proceeds to those that are a little more difficult.
As a note, the easier ones will likely have the least impact, so go through all of the steps to ensure you get everything cleaned up.
Step 1 To Reduce Your Inode Usage – Remove Unused Themes
Start by removing any themes that you aren’t using. I once took over a client site that had 23 different themes installed. She had originally set up her site in 2011 and over the years the WordPress core updates had installed a new annual them. That means she had eight different core WordPress themes installed…none of which she was using.
I usually recommend keeping your active theme and one core theme. By keeping a core theme installed, but deactivated, you give yourself the ability to troubleshoot issue that might arise.
NOTE: Your theme might come with a parent/child or framework theme. It’s important that you don’t delete that. In the image above, you can see that SocMedSean.com uses the Genesis framework and the Streamline Child theme. I keep both of those installed to ensure that I am able to take advantage of all the features of the Genesis framework. Be sure you only delete themes that aren’t necessary for the functionality of your site.
Step 2 To Reduce Your Inode Usage – Remove Old Plugins That Aren’t Needed Or Are Deactivated
With your themes cleaned up, the next step is to remove any unnecessary or inactive plugins. Some plugins are lightweight and require very few files to function. Others, that provide complex functionality, like download managers, security plugins, and form builders require a LOT of different files and images…consuming a lot of inode instance.
Obviously, you’re only going to want to remove plugins that you aren’t using but also remember that the more plugins you load, the slower your site will be. I try to keep plugin use low in order to ensure my site loads quickly. If you’d like to see a list of plugins that I use and recommend, check out this post on speeding up your WordPress site.
Be cautious and methodical about removing your plugins. You don’t want to impact your site functionality.
Step 3 To Reduce Your Inode Usage – Remove Overly-Complex Folder Structures
This is only for those who have created a custom folder/file structure outside of your WordPress instance. For instance, if you use your web hosting to store image files, videos, or documents outside of WordPress. There are a bunch of reasons to do this, but you might consider using a service like Dropbox or OneDrive, rather that chewing up storage, and inodes, on your web host.
If you do need to use a custom folder/file structure outside of WordPress, consider finding ways to simplify the folder structure so additional folders aren’t using up inodes.
Step 4 To Reduce Your Inode Usage – Remove Obsolete WordPress Core Files
If you have blogging on WordPress for a while, you have likely gone through quite a few WordPress updates. Each time WordPress is updated, there is a possibility that some old files remain on your system that WordPress no longer needs. The functionality in these files might no longer be needed or might have been moved into other files within WordPress.
As a result, they are just abandoned and are using up inodes on your server.
The other reason to remove these old files is that by remaining on your server, they could present a security risk if hackers were able to exploit their functions. No need to keep them on your server
The good news is there is a simple plugin that will allow you to remove obsolete WordPress files, called Old Core Files.
Once you have installed, activated, and run the plugin analysis you can see what obsolete WordPress files exist within your installation.
BACK UP YOUR SITE BEFORE YOU DELETE ANY FILES
Once you remove the old core files, you will have taken another step toward reducing your inode usage.
Step 5 To Reduce Your Inode Usage – Reduce The Number Of Images You Have Stored On Your Server
As I mentioned previously, WordPress can cause inode issues due to the fact that it creates multiple instances of every uploaded image at different sizes. If you have uploaded a lot of images to your WordPress site and your theme uses custom image sizes, your media library might be causing your inode issues. These unused WordPress images may not be impacting your site in any way, but they are chewing up your inode quote.
The best way to identify whether this is the problem (and then solve it) is to use the Media Cleaner Pro plugin. The pro version of the plugin is worth investing in because it includes a Trash folder. That means you delete the files and have them added to your trash folder, but not removed from your server.
You can then test your site to make sure that removing the images doesn’t impact any functionality. Once you have confirmed that you don’t need the images, you can empty the Trash folder and the images (and inodes) will be removed from your server.
NOTE: The plugin reminds you of this, but I’m going to remind you, as well. BACKUP YOUR SITE before you run the plugin and delete your images. It’s important to create a restore point before you make big changes like deleting images.
Step 6 To Reduce Your Inode Usage – Delete Old Backup Files
If you have made it this far in the steps to reduce your inode usage, you probably get a sense that backup up your site is important. While any good host will provide you a decent backup service, I’m also an advocate of backing up your site files and database on a periodic basis on your own.
This usually means using a service and plugin like Updraft or Blog Vault. Either of these services will perform a backup of your site and either store the files locally on your server or to an offsite location like Dropbox or OneDrive. If you allow the plugin to save your backup files on your local server, then each file the plugin creates is consuming an inode.
On top of that, the plugin generally adds a log file to your server that indicates whether the backup completed successfully or if there were any issue that popped up during the backup. The result is more inode consumption.
For instance, even though I don’t use Updraft anymore and have removed the plugin, there is still an updraft folder on my server and it contains a bunch of log files. In total, it was consuming 19 inodes even though I wasn’t using the plugin anymore.
This means your backup files and the log files they create could be contributing to your inode issues. If I ran a nightly backup of my files and my database since the day I started this site back in 2009, I would have a LOT of unnecessary files being stored on my server.
An Updraft file backup is usually broken into 3 zip files, the database backup is its own file, and the log file is separate. That’s 5 files for each backup for about 3,650 days. That would result in 18,250 files being stored on my server…all using inodes.
TIP: When you configure your backup plugin, I highly advise that you just keep the last 7-10 days of backups and let the plugin remove any backup files older than that. Obviously, you have to determine what is right for you, but I keep 7-10 days offsite in Dropbox and then also leverage the nightly backups that Siteground performs.
To remove old backup files from a plugin, just review your file manager or use FTP to browse the directory structure and remove any unnecessary files.
Step 7 To Reduce Your Inode Usage – Remove Unnecessary Cache Files
If you are using a caching plugin (and you should be), then it is possible that your caching plugin or plugins might be contributing to your inode issues. Some of the popular caching plugins that people use for WordPress include:
- Siteground SG Optimizer
- W3 Total Cache
- WP Super Cache
- Swift Performance Pro
- WordPress Performance Score Booster
- WP Rocket
Each caching plugin stores cached versions of your pages in order to speed up the load times of your site. While each of these plugins tends to do a pretty good job cleaning up after itself while it is installed and active, they sometimes leave behind folders/files if you deactivate and uninstall them.
Over the years, I have tested or used all of the plugins above and I found remnants of most of them on my server, even though I had deactivated and deleted them. Some were in the root folder, others were inside my /cache directory.
I ended up removing about 300 folders/files that were just sitting on my server counting toward my inode usage.
Between themes, plugins, images, old folders and files, and cache remnants, you should have a pretty good handle on where your inodes are being used.
When I went through all of these steps, they did make a difference. They took me from using about 95% of my inode usage to about 85%. That was good, because it got me off Siteground’s naughty list…but it wasn’t a long term solution. I wanted to see my inode usage down in the 40-50% range.
Step 8 To Reduce Your Inode Usage – Work With Your Host To Remove Folders In The /tmp Or /temp Folders That You Might Not Have Access To
Because I was worried that my inode issue wasn’t resolved and it would creep back up again, I got in touch with Siteground technical support via chat.
NOTE: Siteground’s support is one of the main reasons I continue to recommend them to clients who are seeking cPanel hosting. Their support is top-notch and is always helpful in paying attention to the issue and helping resolve it.
After explaining the issue, the first thing Siteground support did was to recognize that I was working to resolve the inode issue and they assured me that because I was working with them to resolve the issue, my site would not be throttle as a result of exceeding my inode allocation.
Another reason NOT to ignore those emails and be proactive about solving the issue.
The Siteground tech support specialist ran an inode usage report from the server and was able to show me exactly which folder were consuming the most inodes. Unfortunately, that report told me the exact same information that I got from the cPanel tool, so it didn’t explain why I was still in the 85% range for allocations.
As a result, the specialist opened a ticket and a higher-level server specialist took a look. What they found was a folder that contained a LOT of cache files that were old and out-of-date. They were able to safely delete more than 211K files from the /tmp/ folder which ended up resolving the issue.
Once those files were deleted, my inode usage dropped to about 46% of my allocated limit.
Okay….I know what you’re thinking.
Why didn’t Siteground clean this up without making me jump through all these hoops?
There are a lot of things I expect from my host. Solid server performance, stable availability, good backups. But managing my file system isn’t something I really expect. As I mentioned earlier, SocMedSean.com has been in existence since 2009 and I have only been hosting with Siteground since 2018.
Before that, I had 3 different hosts and it’s possible that the /tmp/ folder issue was caused by the previous host and Siteground simply adopted the issue when they migrated my cPanel instance to their servers. For that, I can’t penalize them…especially since they were instrumental in helping me identify the issue and resolve it.
Others might be thinking:
Why did you make me go through steps 1-7, when step 8 was the actual solution?
Just because step 8 was the solution for my site, doesn’t mean it’s the solution for yours. I wanted to provide other bloggers with the ability to identify and resolve the issue on your own, especially if the problem isn’t one that is similar to mine.
I work with a lot of different WordPress clients and the majority of the issues that they bring to me are based on themes, plugins, and large media libraries. By giving you the steps to resolve inode issues related to themes, plugins, and images I hope to have helped you without involving a single support ticket with your host.
With that said, if these steps don’t resolve your issue, I encourage you to open a ticket with your host and ask them to help you resolve the issue. That way, you don’t click that “upgrade” button and spend money unnecessarily.
I hope this helps you resolve your inode issues. If you have additional tips that you think might help others resolve their inode issues, be sure to leave a comment so they can benefit from them.