How Scalable Is WordPress?

Here’s a slide from a presentation for a talk held by Iliya Polihronov back in 2012:

A lot has changed over the past 5 years and the numbers are significantly higher now – without having up-to-date stats publicly available now.

Millions to Billions of Views With WordPress

While Automattic maintainс a massive distributed server infrastructure in order to handle tens of millions of blogs for their hosted blogging platform, a comparable amount of traffic could be handled for a single site install at a more affordable fee.

Some of our customers serving over 100 million page views monthly pay $5,000 – $10K a month on hosting fees. Scaling up to 500M and higher would require a more notable investment. Handling tons of concurrent users, a multisite network, some resource-heavy components (say, video streaming or image management) would definitely contribute to the hosting costs.

WordPress Can Scale a Lot

A simple blogging or magazine website running a lightweight theme and a few simple plugins can serve tens of millions of page views a month easily. The vast majority of the content can be cached in multiple layers (through object caching and page caching) which will decrease the impact on the server.

However, most websites tend to be much heavier. They do integrate a number of 3rd party services and solutions. Or integrate heavy premium themes. Or install complex and cluttered plugins affecting both the stability and the scalability of a website.

Combined with the higher traffic and larger content volumes, hosting charges can be quite demanding.

WordPress for Real-Time Data Broadcasting

Serving real-time data is also a challenge. The more you could cache for all of your visitors, the lower the server consumption.

Scaling a WordPress website goes through the same brainstorming process for scaling any web-based application.

Certain areas that require attention are:

  • Database load
  • Handling a large volume of concurrent users
  • Storing data in the most efficient manner
  • Dealing with various HTTP requests triggered from each page load
  • Implementing the right caching layers
  • Handling media assets

The more a WordPress platform grows, the more considerations and opportunities there are to optimize specific areas.

With the popularity of cloud-based services, a web application can grow steadily even without having to restructure the entire platform and split it manually across different physical services.

WordPress in the Cloud

An optimal network diagram, credit:

AWS is a great example offering its Elastic Beanstalk solution dealing with load balancing, automatic scaling of instances, provisioning capacity on demand, monitoring application health, offloading traffic to replicated instances in case of failover.

Most scalability issues with WordPress are related to:

  • improper server management or a cheap infrastructure
  • lack of decent caching
  • incorrect data management
  • overusing heavy plugins
  • dealing with large media assets
  • loading tons of scripts and styles across the entire website.

Quick Tips to Scale a WordPress Website

Taking performance lightly is a recipe for disaster. Scaling a WordPress site quickly is only possible with a solid investment of time and resources — paid traffic, PR campaigns, news appearances, and leveraging key events for maximum impact.

All of this requires professional development help for optimizing database queries, reducing the number of HTTP requests per page, compressing and minifying assets, lazy loading images or ads, to name a few. That said, some best practices are easily achievable and often recommended before the development team jumps in.

Note: I’ve covered a few more tips for scaling traffic during seasonal events in my article for Publishing Executive here.

1. The Right Hosting Provider

A generic hosting provider may be your biggest pitfall while scaling your website.

Generic hosting providers aim to support all sorts of web applications. In the PHP ecosystem, we have phpBB and Invision Power Board as popular forum solutions, Gallery2 for galleries, a bunch of content management system like Drupal and Joomla, analytics tools and plenty of ad-hoc systems and frameworks.

If your WordPress agency employs DevOps experts and system administrators and can provide 24/7 support, a barebone cloud hosting solution will be a great asset. Otherwise, most WordPress professionals work with managed hosting vendors like Pagely. Managed WordPress hosts optimize their infrastructure for WordPress, disabling unnecessary components and modules, trimming down the setup, and optimizing for performance and speed. It’s a worthy investment in the long haul.

2. Image Compression

Using tinypng to compress 1.6MB image to 258KB

Compressing images uploaded in your WordPress media component is really valuable and not as complicated.
Large and bloated images take forever to load, which is unbearable on a mobile network. This slows down the website, increases the bandwidth to your server, drops your SERP rankings in Google, and increases your bounce rate. Nothing good comes out of slow website images!

  • First off, always resize your images before uploading to a reasonable size, unless you only use thumbnails and predefined image sizes. It takes under a minute to resize an image and you avoid cluttering your server space.
  • Second, use a 3rd party solution for compressing them., EWWW, Imagify, TinyPNG are several popular solutions that squeeze the most out of your image. This may reduce the size of a generic image with 70% on average.
  • Some of the image compression tools have WordPress plugins. Consider signing up and adding one which would compress every image uploaded to your WordPress media folder.

3. A Lightweight WordPress Theme

Most premium themes are quite heavy as they cater for every type of business. From photographers through eCommerce to large media sites or social networks, they support a load of features that increase the complexity of the platform tenfold.

Sticking to a basic (yet beautiful) WordPress theme will ensure you don’t load dozens of additional scripts, styles, and fonts that add up to the load time of your site.

4. Simplified WordPress Plugins

Same goes for WordPress plugins that act like a Swiss Army knife.

Instead, shoot for simple plugins that solve your job — nothing else, nothing more. This will get the job done without triggering a hundred additional conditional workflows to get the same job done.

5. A Content Delivery Network

Content delivery networks will distribute your static assets (HTML, scripts, styles, fonts, images) to hundreds of nodes around the world. A website visitor will fetch these assets from the closest node (geographically) and won’t hit your server every single time.

This is a common optimization approach that brings additional perks, too. CDNs tend to include additional protection measures against DDoS attacks or other loopholes across WordPress websites. CloudFlare and Sucuri are two of the popular options, the first one known as a CDN first and the latter — an established WordPress security vendor with an integrated CDN.

Note: Most managed WordPress hosting providers offer an in-house CDN or integrate with a popular one — double check before signing up for a separate provider.

6. Minifying/Combining WordPress Assets

A bit tricky as side effects are not uncommon.

  • Minifying scripts and styles results in smaller file sizes. Variable names are trimmed down to a character or two. Whitespaces are cleared up, and the resulting file is easier to fetch and parse from the browser.
  • Combining these assets means fewer HTTP requests to fetch each one of them. Instead of loading 150 scripts and styles for a large magazine page, you can bring these down to 50, massively decreasing the load time of your page.

Sometimes, regressions may occur — especially for opinionated browsers like Internet Explorer. Complicated scripts may be parsed wrongfully, or loaded in an incorrect order. This tends to work fine for simple pages but when in doubt, only test on staging before consulting with your WordPress vendor.

If your application can benefit from using a CMS, WordPress is a legitimate choice. You can leverage numerous APIs out of the box. Whenever you require a different set of data which isn’t suitable for the default schema, you’re free to create your database tables and design a lightweight data framework on top of what WordPress provides.

Basically, you can only go wrong if your application doesn’t need a CMS. If you don’t deal with logged in users, media, comments, or store a unique set of data that doesn’t resemble WordPress posts or pages (or extend them), a plain solution may work better.

If you target a heavy and bloated theme and tons of convoluted plugins, that will also affect your performance and stability big time.

Otherwise, WordPress can easily scale tens of millions of monthly visitors. You can stretch it past the 100M mark with the right setup and careful consideration of business needs vs. technical limitations.