Wordpress shared hosting and limits on file numbers

Shared hosting for Photographers and Inode file number limits.

Shared Hosting for Photographers, NextGen Gallery, and Inode Limits

I profess to not being a database expert and knowing all the in’s and out of php or wordpress and associated plugins. But I know enough to get several websites up and running, particularly with shared hosting for photographers.

Most of the time I can figure things out. What I learnt today was that through shared hosting, although you may have 50gb file limits which can be plenty, you also have limits on the number of files you can have. For my shared hosting it is 250,000. That may sound like a lot but databases can write a lot of files, particularly WordPress.

Today, after several hours of search and digging, I discovered that I had hit my 250,000 file limit for shared hosting of my photography wordpress sites. I only know this as there is a section in CPanel which shows you your usage. In fact, I was over the 250,000 inode limit (which is what they call files) by about 25,000. This came about as I was trying to create a new WordPress website and could not write anymore files to the hosting platform. In fact, I could even set up a new domain.

The Problem Files

I narrowed the huge file numbers to two culprits. A php cache several years old and full of files (120,000+), and (I hate to say this) NextGen Gallery plugin. The NextGen Gallery Plugin had about 80,000 files in the cache. I suspect over the years of faffing about with uploading images, thumbnails etc, the cache has grown bigger. There is no indication that I could find in the NextGen plugin panel on the actual size of this cache (no warnings given). I had to ascertain the location of the large number of files via CPanel.

Photography webites are full of image files which can be large, but also full of re-sized image files for vairous uses, so the Inode file numbers issue seemed to compound. This is something to know about your shared hosting. What is your Inode limit?

The Solution

There is an easy solution which is to go to Other Options – Miscellaneous in the NextGen Gallery and Clear Image Cache. Obviously, I should do this regularly but wouldn’t it be great if there are an auto feature you could set to do this. Looks like I’ll be doing some more research into this.

© Finephotography 2021