Scaling WordPress Website for High Traffic – All you Need to Know

Last updated - February 24, 2020

Imagine that all your efforts finally paid off and your WordPress site is gaining hundreds of new users every day, then thousands, and then… it goes down. Don’t wait for this disaster to happen – Know everything about scaling WordPress website before you reach a critical point with these simple tips.

As everyone who’s familiar with Spiderman knows, with great power comes great responsibility! It works the same way for websites, too – you have a responsibility towards your visitors. The more your online influence, the more effort you need to invest into scaling to ensure proper performance – even in peak times.

According to a recent study, over 90% of WordPress users choose this CMS for its scalability, among other reasons. But just because a WP site CAN scale almost to infinity, doesn’t mean that it will automatically do so. It’s just like with health: your body can be healthy and serve you for many decades, but only if you eat well and exercise, right?

There are several key elements that influence how well your site scales. They are web hosting, WP configuration, and content. I’ll deal with them in turn.

Is your hosting provider up to the task?

Almost all new WP site owners go for shared hosting – and it’s a wise decision. There’s no point paying $50+ a month for a VPS server when you don’t even know if your page will be successful or not. With shared hosting, your site “lives” on the same server with hundreds of others. Leading hosting providers have servers that are powerful enough to ensure high loading speed for all those sites. However, if you have a sudden surge of traffic, you can run into problems.

You see, when one site on a shared server gobbles up too much resources, all the others will suffer. Not all hosting providers deal with such bottlenecks equally well. Make sure that you choose a reliable provider with a fast response time and good uptime. If you find that your current provider falls short of the industry standards, change it before it’s too late. Switching to a different hosting is relatively painless while your traffic hasn’t become too large yet.

Important note: even though many providers offer “unlimited” bandwidth and traffic nowadays, they are not REALLY unlimited. Somewhere in the fine print, it will say that the provider might make you move to a private server if your traffic goes over the roof:

Scaling WordPress Website
Credits: fatcow.com

So even with the fastest shared hosting, you’ll have to upgrade to VPS as you continue to scale. By that time, it will be worth it, though.

Check your configuration

Even if you’re not a tech guru, there are many things you can do to speed up your site. I recommend that you perform the steps below even if your site traffic isn’t skyrocketing yet. Remember: slow load speed is really bad for conversions. Many users nowadays won’t wait even 5 seconds for a page to load – especially on mobile.

1) Choose a fast-loading theme

There are hundreds of free themes out there, and they aren’t all created equal. To choose one that’s optimized for speed, you can consult one of the many theme lists. If your site is already live and you find out that your theme isn’t great speed-wise, you can switch to a different one. But it’s better to choose a lightweight theme at the design stage.

Scaling WordPress Website
GeneratePress – one of the more speed-optimized themes. Credits: WordPress.org

2) Get rid of poor-quality plugins

You might be using dozens of plugins on your site. Many websites use 80 or more – and each plugin adds some code to your page. It’s not a problem in itself, as long as each plugin is properly written. Unfortunately, some plugins are too resource-hungry and can affect the performance.

There are two good ways to find the offenders:

  • Check each of the plugins you are using against a list of plugins that are known to slow down sites;
  • Use a free tool like Query Monitor (though you’ll need a tutorial to interpret the results).
Scaling WordPress Website
Query Monitor interface – Credits: WordPress.org

3) Install a caching plugin

Every time a user wants to visit your page, WordPress has to serve hundreds of files and scripts. For each new visit, this process is repeated. However, there’s a great way to reduce the amount of data to be transferred every time: caching plugins. They create copies of your pages and then serve them to all future users without having to fetch all the files.

Using a caching plugin can make your pages load up to 5 times faster. Some of the popular free ones are WP Super Cache, W3 Total Cache, and WP Rocket. 

Go a little deeper

If you’ve already tried the solutions described above, you are now ready for something a bit more advanced.

1) Analyze your HTTP requests

Each web page consists of dozens and even hundreds of elements: pictures, CSS, JavaScript files, and so on. When a browser asks a web server to display a site, it has to send as many requests as there are such elements. And each HTTP request takes time. For a small piece of code this time is negligible. But a high-resolution background image, for example, can take a whole second to load.

If you want to know how many requests your page requires, you can use a tool called GTMetrix. Simply enter the URL in the search field and hit Test Your Site.

Scaling WordPress Website
Credits: GTmetrix.com

Here I’ve used a random cooking blog as an illustration. As you can see, it takes a whopping requests.

Scaling WordPress Website
Credits: GTmetrix.com

If you click on Waterfall, you’ll see a full list of requests with the size and loading time for each.

Scaling WordPress Website
Credits: GTmetrix.com

If this seems a bit overwhelming, consult GTMetrix Waterfall Chart guide. While knowing all this won’t make your site faster in itself, it will give you a clue as to what to do next. For example, you might want to optimize images that take too long to load or to minify some scripts. 

2) Install a CDN

CDN stands for Content Delivery Network. What it means is a network of web servers located in different geographic points around the world. The idea is that the closer you are to the server, the faster you get your pages. CDNs work in a similar way to caching plugins, just on a larger scale. They keep static copies of your pages and serve them to users – depending on where those users access the site from. Popular free CDNs include Cloudflare, Jetpack, and BootstrapCDN. 

What else can you do?

WordPress optimization is a never-ending quest. Here are a few more things you should try:

  • Image optimization: make sure to compress large images to below 200 kb. Your total page size should be below 2 MB.
  • Optimize databases: MySQL and MariaDB databases can be a source of unnecessary requests, too.
  • Use lazy loading to serve videos and images even faster;
  • Always install WP and plugin updates.

This can seem like a lot to take in – especially when you want to concentrate on getting more visitors. But believe me, all those visitor numbers won’t help you much unless your site performs properly. They will come, find a slow or crashing site – and leave, never to return. So go on and invest a week or two into learning scaling techniques. Eventually you’ll be happy you did.

Further reading

LEAVE A REPLY