Improving the performance of a Wordpress site. Print

  • 0

As a hosting provider it's a little tricky to provide specific guidance that covers how to improve the performance of a Wordpress site. We can't tell you exactly what you'll need to click on, or exactly what you'll need to do to improve your website's performance.

This is because Wordpress is a very variable environment.

Wordpress is an open platform, which means that anyone can develop plugins or themes for it. Although Wordpress core is consistent and maintained by a single party, every plugin and theme that's installed in a Wordpress installation could potentially each be managed and maintained by different organisations or individuals.

If, for example, you have installed a theme, and 10 plugins, this could mean that 12 parties have contributed to the code base of your Wordpress installation. It's unlikely these 12 parties ever speak to each other.

There are currently (at the time of writing) 11,720 free themes, and 59,576 free plugins available for Wordpress. If we took 10 plugins as an average, that's around 696,972,320 potential variations of Wordpress installations. What's that? You'd like a guide for reach? Sure, I'll get back to you in 670,000 years time!

I'm joking, but I hope it illustrates a point.

When using Wordpress, there are some consistent factors that you should take in to account when considering what could be "slow":

  • It takes time for a browser to render a web page. The page output that's rendered is what your Wordpress installation generates.
  • It takes time to execute code, and as Wordpress executes (as a whole) to generate a page, the more plugins you use, the more code is executed, and the more code that's executed, the longer it takes to generate page output.
  • Not all plugins and themes are created equal. Some plugins will generate large numbers of database queries, compared to others. Some plugins will have a larger code base (think lines of code) compared to others. More code execution, and more database queries tends to mean more "slow".
  • Not all page builders are created equal, some will add unnecessary elements to page output, which will take longer to render.
  • Wordpress isn't a static environment. Applying updates is required to keep your Wordpress secure, but that means some code bases (specific to plugins, themes and Wordpress core) change. Consequently "it wasn't slow last week" doesn't really mean anything useful.
  • The operation of a Wordpress site has a RAM and CPU overhead. What this overhead is is roughly "what's being operated in Wordpress" x "number of visitors". If your Wordpress causes the RAM and CPU limit to be reached (you can use the "Resource Usage" facility in your cPanel to check this), your site will slow down. You then have a choice between either reducing the RAM and/or CPU overhead of your site, or upgrading your hosting to cover your site's overhead (upgrading is really the only thing that "can be done on the hosting").

If we take the concepts mentioned above, they generally fall in to two categories:

  1. What's taking place within Wordpress
  2. What's taking place in the browser when it renders a page generated by Wordpress

The "in Wordpress" part

The MySQL query monitor can be used to identify components of your Wordpress that execute large numbers of database queries, and database queries that take a longer time to complete. Consider removing or replacing the respective components.

The Code Profiler plugin can be used to identify components of your Wordpress that have longer code execution times. Consider removing or replacing the respective components.

After using either of the plugins mentioned above, consider deactivating and uninstalling them.

Index WP MySQL For Speed is a quick and easy way to index large database tables.

 

The browser/page output part

There are multiple tools you can use to analyse your sites page output:

https://pagespeed.web.dev/

https://gtmetrix.com/

https://speedvitals.com/

https://www.webpagetest.org/

There are a wide range of issues that these tools will flag. The steps you'll need to take to address these issues vary according to what the issue is, and your Wordpress. You're going to need to:

Check for issues using the tools above.

Understand what needs to be done to fix the flagged issue the tools above report (your best source of information in this capacity is here: https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/

Work out how to apply the fix to your particular Wordpress installation.

Plugins you may find handy when addressing the above:

Debloat (minify and combine CSS and JS assets, defer and delay non-critical assests)

Autooptmize (minify and combine CSS and JS assets, also good for debloating your site's database)

Unbloater (effectively turn off parts of Wordpress you don't need)

Asset Clean up page speed booster (unload CSS and JS that isn't required, the free version doesn't cover blog type websites)

CAOS (localise google analytics)

Converter for media (batch convert images to webp format, addresses "serve images in next-gen formats)

OMGF (localise google fonts)

 

Caching plugins

Ideally you'll need to carry out the above before using a caching plugin (if you don't caching will not be as effective).

Simply installing caching plugins alone will have little to no effect, they need to be configured in addition to being installed. Configuration varies according to the caching plugin and your Wordpress installation.

Object caching is available on all our shared hosting servers, the settings you'll need to use to configure these are:

For Redis:

Server address: 127.0.0.1

Port: 6379

For Memcached:

Server address: 127.0.0.1

Port:11211

Caching plugins you may find useful:

WP-Rocket (paid only, but very effective)

Hummingbird cache (no object caching, but very fully featured otherwise)

W3Total Cache (very fully featured, maybe a little config heavy, you'll need the paid version to address render blocking CSS and JS)

Litespeed cache (this is more effective if you're hosted on a Litespeed capable server - we're currently rolling this out over our estate - still has a good effect even without the litespeed web server, CDN integration available - additional costs may apply).

 

Content Delivery Networks (CDNs).

CDN's read your site's content from our platform and serve pages to visitors from epic, load balanced, geographically distributed swanky platforms. You do need to have a fairly reasonable handle on how to administer DNS if you elect to use a CDN. Free CDN packages are available that are suitable for sites with lower bandwidth, but you may have to pay for CDN usage if your content goes viral or something with a similar to your rental holiday cottage ends up on Grand Designs (yes, this has actually happened). The purpose of a CDN is to serve site content in a reduced time. Cloudflare is a very commonly used CDN, and QUIC.cloud is up and coming and also integrates nicely with the Litespeed cache plugin.


Was this answer helpful?

« Back