TransWikia.com

How many post WordPress can handle?

WordPress Development Asked by Kabir on November 6, 2021

I am maintaining a multiuser blog site in wordpress cms. I got 30/40 post per day, its mean around 10k post at the end of year. Every post contains a featured image at around 140kb file size.

The site still new, a couple of thousand posts are made only. But I checked the 404 report. It’s bad, getting around 100 404hit in main domain (https: // www.mysite.com) each day. In total 150hits.

Note: I use cloudflare cdn.

Why its happening? Why I got 404 in my main domain?
How many post wordpress can handle? (not big post, avg 15line and a featured photo.)

can anyone enlighten me

love

One Answer

There isn't a hard upper limit of how many posts WordPress can handle. The practical limit for your site depends on these things in this order:

  • The queries your codebase runs
  • Server power
  • Disk space

But before we go into this, WP will not generate 404's because there are too many posts. If this is the issue you are trying to debug, then the theory that it is because there are too many posts is incorrect. A site that had too many posts to run would generate a PHP timeout fatal error, or report that it was unable to access the database. Or, it would work, but be mind numbingly slow.

Sites will get 404 hits naturally, either because users made mistakes copying URLs, bots tried random addresses, or malware fired every exploit it knows ( malware doesn't check if you're running WP, it just runs all of them in the hopes 1 will work, you might even see Drupal exploits in there ).

The queries your codebase runs

This is by far and away the biggest determiner of how big your site can get in traffic and post count. So much so that you could easily ignore the other two.

Bad queries are the prime cause of poor performance, and they get slower as the number of posts rises.

There are WP sites capable of handlings millions of posts, and billions of visitors.

However, I've seen at least one of these sites brought too its knees despite enterprise grade caching, by an uncached query to find posts that had a particular meta value.

Some queries scale linearly, these are good, and can be easily optimised, they can run fast with huge numbers of posts.

Some queries however, do not. Here are some examples:

  • Any query that specifies the meta_query parameter, or meta_key + meta_value
  • Any query that orders things by rand
  • Any query that uses NOT or the __not_in clauses

These all make the database build temporary database tables, or full table scans. They're fundamentally expensive, get slower as the post count rises ( yes it ran fast when you had 10 posts but not so much when you have 100 ).

But importantly, they're super popular. Most plugin and theme developers are unaware of this, and add flags to posts that should be terms in a taxonomy, crippling the sites ability to handle huge numbers of posts, or huge numbers of visitors, slowing down the site significantly.

The important part of this, is that by running heavy queries, your site becomes slower, and your server can handle fewer concurrent visitors. If the query is heavy enough, it won't finish in time and the page will fail to render. If too many heavy queries happen at the same time the DB can fallover.

Tools such as Query Monitor can help you identify these queries in plugins and themes.

Server Power

Queries are the biggest determiner of how big a site can get. A poorly built site on super expensive dedicated hardware with 1k posts can be slower than a properly built site on super cheap shared hosting with 100k posts if the developer knows what they're doing.

Having said that, a dedicated database server can be helpful, rather than having it on the same machine. SSD's help too, as does a lot of RAM. But this will not have as big an impact as most people expect.

If the choice is between spending more on hardware, or spending money on fixing queries, always go for the queries

Disk Space

It's possible you stored so many posts your disk ran out of space. This usually means you have a truly monstrously sized database, and that you have a lot of extra tables that aren't posts. The chances of this happening are incredibly small, so much so I can't think of an example where too many posts used up the disk space after 13 years of working with WP. I include this mostly for completeness.

Answered by Tom J Nowell on November 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP