All ArticlesHosting2026-11-09T19:50:00+08:00

Unlimited Shared Hosting Has an Inode Limit: Why It Breaks MDX Sites and News Portals

Shared hosting plans that advertise unlimited storage usually cap the number of files you can store, and file-based content like MDX burns through that cap fast. After reading, you will understand how inodes are counted, why a news portal on MDX is the worst case, and what to ask a host or change in your architecture before you hit the wall.

A shared hosting plan can say "unlimited storage" and still stop you from publishing your next article. The reason is the inode limit: a cap on how many files and folders your account may hold, regardless of how many gigabytes they use. For a classic database-driven site you rarely notice it. For a modern site whose content lives in files, such as MDX, Markdown, static build output and pre-generated images, it is often the first limit you hit.

What an inode is

An inode is the record a Unix filesystem keeps for each file, directory or symlink. Every one of them uses exactly one inode, and a 200-byte MDX file uses the same single inode as a 2 GB video.

That is the whole trick behind "unlimited". Storage and file count are separate meters, and the host usually advertises the one you will not run out of. You can have 99 percent of your disk free and still be unable to create a new file because the inode quota is spent.

Why "unlimited" is not unlimited

Shared hosting packs many accounts onto one filesystem. Every extra file costs the host in backup time, filesystem metadata, cache pressure and IO, so providers cap file counts per account, commonly in the range of tens of thousands to a few hundred thousand depending on the plan (check your own plan, the exact number varies by provider).

This is usually disclosed in the terms of service or a fair-use policy, so it is rarely false advertising in the legal sense. In practice, though, the headline promise and the real constraint are measured in different units, and that is what catches people out.

Why MDX collides with the model

Shared hosting was designed around WordPress-style sites. There, a thousand articles are a thousand rows in one MySQL table. The file count stays roughly flat no matter how much content you add.

MDX flips this. Each article is a file, so content growth maps directly to inode growth:

  • One MDX file per article.
  • One built HTML file per article if you export statically, and in some frameworks extra payload or JSON files per page.
  • Several image variants per article: original, resized widths, WebP or AVIF copies, thumbnails.
  • Index pages for tags, categories, authors and pagination, which multiply as content grows.

An article is no longer one unit of content. It is easily ten or more files.

The news portal math

News portals are the worst case for three reasons: high publishing volume, an archive that is never deleted, and heavy image use. Here is an illustration. The per-article count of 10 is an assumption (1 MDX, 1 HTML, 1 payload file and about 7 image variants), so adjust it for your stack.

  • Small blog: 200 articles x 10 files = about 2,000 inodes. No problem.
  • Local news site: 20 articles per day for 2 years = 14,600 articles x 10 = about 146,000 inodes. Already close to many plan limits.
  • Mid-size portal: 50 articles per day for 3 years = 54,750 articles x 10 = about 547,500 inodes. Over the limit of most shared plans, before counting anything else.

And that count only grows. A portal never gets smaller, so the question is not whether you hit the limit but when.

Other things that quietly eat inodes

The articles are not the only consumers, and these often tip an account over:

  • node_modules. A typical modern JavaScript project can contain tens of thousands of files by itself. Running npm install on the server charges all of them to your quota.
  • Build output and caches. Folders like .next, .cache or dist, plus incremental build caches.
  • Email. Maildir stores each message as a file, so a busy mailbox can hold tens of thousands of inodes, and it usually counts toward the same quota.
  • Sessions, logs and backups. Old PHP sessions, rotated logs and unpacked backup archives.
  • Image pipelines. Pre-generating every size and format for every image multiplies file count quickly.

Why a database does not have this problem

A conventional database stores rows inside a handful of data files. With MySQL InnoDB and file-per-table enabled, each table is typically one file, so a table with ten rows and one with ten million rows cost about the same number of inodes. Content scales inside the file, not across the filesystem.

That is why the same portal built on a CMS with a database can fit comfortably on a plan where its MDX version cannot. The data volume is identical. Only the storage shape differs.

What happens when you hit the limit

The failure is not graceful. Once the quota is full, the account cannot create any new file, which shows up as:

  • Publishing a new article fails if it requires writing a file.
  • Uploads fail or produce zero-byte files.
  • Cache and session writes fail, causing odd runtime errors.
  • Incoming email bounces or is deferred.
  • Builds and deploys stop halfway, sometimes leaving a broken site.
  • Backups slow down or fail, and some hosts suspend or throttle the account.

What to do about it

Match the architecture to the constraint, or move off the constraint.

  1. Put content in a database or a single-file store. Keep MDX as the authoring format if you like, but load it from a database or from one SQLite file (one inode for thousands of articles) instead of one file per article.
  2. Move images to object storage and a CDN. Store originals in S3-compatible storage and resize on demand, rather than keeping every variant on the hosting filesystem.
  3. Build elsewhere. Run npm install and the build in CI, and upload only the finished output. Never keep node_modules on the shared account.
  4. Archive old material. Pack rarely used folders into a single tar.gz, and prune caches and old email on a schedule.
  5. Use rendering that does not write a file per page. Server rendering or incremental regeneration avoids a permanent HTML file for every article, but it needs a Node runtime, which most shared plans do not offer.
  6. Move to a VPS or cloud instance. You control the filesystem, and inode capacity is a function of how the volume was created rather than an arbitrary plan cap.

Check before you buy or deploy

Ask the host these questions before committing a file-heavy site:

  • What is the exact inode limit, and is it a soft or hard limit?
  • Does email count toward it?
  • What happens when the limit is reached, and is there a grace period?
  • Can the limit be raised, and at what price?

To see where you stand on a server you control or can SSH into:

# filesystem-level inode usage
df -i

# which top-level folders hold the most files
du --inodes -d1 ~ | sort -n | tail -20

# total files under the current directory
find . -xdev | wc -l

On cPanel, the same number is shown as inodes in the resource usage or disk usage screens.

The takeaway

"Unlimited" on shared hosting describes bytes, not files. If your content is stored as files, and especially if you run a news portal with a growing archive and many images per story, count your inodes before you pick a plan. If the numbers do not fit, change where the content lives, or change where you host it.