How To Analyze and Increase WordPress Performance

How to Analyze and Increase WordPress Performance

WordPress is the most popular CMS in the market. Almost 40% of the websites on the internet use WordPress as their CMS. At one place where WordPress doesn’t shine is its performance. WordPress is nowhere near perfect (in terms of performance) but we can analyze the performance and improve it. In this post, I will show you how to analyze and increase the performance of WordPress, and also I will show you how to improve it.

Why Do I Need to Increase WordPress Performance?

When the internet came in the early 90s, the best speeds the consumers could get was 56K (Kilobits per second) via the dial-up modems which used phone lines to send and receive signals. But, in the early 2000s, people got access to much higher speed connections (cable internet, DSL, etc.). On average, they were 10 times faster compared to dial-up connections. So, naturally, people got accustomed to websites loading faster than before. Nowadays we have fiber connections that can reach gigabit speeds. So, an average internet user who will see other sites loading in a snap and your site taking ages to load, why will he return back to your site or even visit it in the first place?

Slow site speed leads to a lot of problems mainly due to users getting irritated and impatient. As a result, most of them don’t visit the site a second time due to the slow speed of the site. Also, slow sites are penalized by Google as they are ranked less. Due to these things, you should always have a fast site.

How to Monitor a WordPress Site’s Performance?

There are multiple ways to monitor your WordPress site’s performance. In this post, I will tell you some of the easiest (nd FREE) methods to do the same.

GTMetrix

GTMetrix

GTMetrix is one of the ways by which you can measure your site’s performance. It uses lighthouse and WebPageTest simultaneously and after that, it combines the two of them through a proprietary algorithm to analyze the performance of a web page.

Although GTMetrix is a good testing tool, recently, due to their algorithm changes, many times their results are optimistic and deviate a lot from the real-world performance. For real-world performance analysis, I recommend using WebPageTest all by itself.

WebPageTest

WebPageTest

Here is the test result of my site (ignore the cache control D grade. It’s due to AdSense’s fault):

WebPageTest Result

The grades give you a brief idea on what to focus on. Click on them to get the details.

The Performance Results part gives you the details about your site performance. The most important indicators for Core Web Vitals are: FCP, LCP and CLS. TTFB is also important.

For the requests made and the time taken for them to load, check out the waterfall. This will help you to know about the requests that are slowing down your site.

How to Increase WordPress Performance?

Fortunately, most of the performance issues of WordPress can be fixed very easily. Some of them require changing some server-side code and some of them require plugins.

Here are some of the quick and easy ways by which you can increase WordPress performance:

1) Enable Compression

Compression has a huge effect on any website’s speed. These days, most web hosts enable compression by default. If your host has disabled compression and they are unwilling to help you out, you can try gzip plugins for WordPress. To test out if your site has compression enabled, you can use Check gzip Compression by SEO Tools.

gzip Compression Test

If your host runs CPanel, then you can enable compression by going to the Optimize Website option under the Software panel then selecting the option to Compress All Content.

If your host doesn’t use cPanel, then ask your host for support. If they are unable to enable gzip from their side, you can try any gzip plugin from the WordPress repository (although, this will only work if gzip is enabled on the server).

2) Change PHP Version

WordPress is based on PHP. So, the version of PHP your site runs on has a huge effect on the performance. Make sure you use at least PHP 7.3 on your site. Most hosts will easily allow you to switch the PHP version.

Also, make sure you use the FPM processor instead of the default one. This will further increase performance.

SiteGround PHP Version Switcher

3) Optimize and Compress Images

Gzip compression doesn’t work with images. So, images have to compress separately. For that, many plugins are available in the WordPress repository. Personally, I recommend the following plugins:

  • Imagify
  • Smush
  • EWWW

Also, some hosts like SiteGround will provide you with their own image optimization plugin.

Alternatively, you can compress the images before uploading by using photoshop or any online tool.

Also, consider serving webp images as they are smaller than jpeg or png images with no loss in quality. All image optimization plugins mentioned above have webp conversion option. Make sure to lazy load the images to reduce the initial page load time.

SG Optimizer Image Optimization

4) Use a Caching and Performance Optimization Plugin

Caching is really important because cached pages are directly served from the webserver without the requests going to the database or the PHP processor. This helps to handle a lot of traffic and it also increases the site speed.

There are different types of caching:

  • File-based caching on disk
  • Server level caching (on either disk or in RAM)
  • Database caching (Memcached, Redis etc.)

Performance optimization can be done in multiple ways. Some of them are – Minification of scripts, preloading CSS JS files etc.

Some of the plugins that can be used for this purpose are:

  • Autoptimize
  • WP Rocket (Paid)
  • W3 Total Cache

Alternatively, some hosts provide their own caching and optimization solution (SiteGround provides 3 levels of caching – Server-level caching, Dynamic caching, and Memcached for database caching. Also, they provide the SG Optimizer plugin which does minification, preloading, etc.).

SiteGround SuperCacher
SiteGround SuperCacher
SG Optimizer Plugin

5) Use a CDN

A CDN is extremely useful for speeding up websites as they cache the site’s content on their PoPs. This helps to reduce the distance between the user and the website. This also helps to reduce the load of the webserver.

CacheFly

Some of the popular CDNs are:

  • Cloudflare
  • Akamai
  • StackPath
  • KeyCDN
  • CDN77
  • CacheFly

6) Choose a Fast Theme

Often, the theme used is the main culprit due to the slow site speed. Most of the eye-catchy themes are poorly optimized for site performance. Pagebuilders further deteriorate performance.

WordPress Themes

Some of the best performance optimized themes are:

  • Astra
  • GeneratePress
  • OceanWP
  • Neve
  • Twenty Twenty-One

7) Delete Unnecessary Plugins

Plugins add unnecessary page size and requests to your site. On an average, one plugin adds around 130ms of loading time. Even if a plugin is disabled, it may add some requests (due to bad coding of the plugin). So, it’s best to delete unnecessary plugins.

WordPress Plugins

Also make sure to get plugins from good, reputable developers because often times smaller developers make poorly coded plugins which further worsens site loading speed.

8) Disable Unnecessary Scripts

You don’t need the contact form script on every page of your site. Do you? Same goes for many scripts which is needed on specific pages of a site but they load on every page which slows down the entire site.

Perfmatters

To disable scripts and many other unnecessary things (like WordPress emojis, xmlrpc etc.), we can use some plugins. Some of them that can achieve this work are:

  • Perfmatters
  • Disable XML-RPC-API
  • Asset CleanUp

9) Control Heartbeat

The WordPress Heartbeat is a server polling API used for real-time frontend updates. By default, it checks for updates every 15 secs which in turn can put a huge load on your server. Disabling it completely is not recommended as many plugins rely on it to function. Instead, we can reduce the number of times it checks for updates every minute.

SG Optimizer Heartbeat Optimization
SG Optimizer Heartbeat Optimization

Some of the plugins to achieve this is listed below:

  • Heartbeat control by WP Rocket
  • WP Rocket
  • Perfmatters

Some hosts also offer this option either via a plugin (like SiteGround offers it via their SG Optimizer plugin) or via modifying WordPress files (like WPEngine or Kinsta).

10) Change your Hosting Provider

Doing everything mentioned in steps 1-9 may not improve the performance of your WordPress site that much if your hosting provider is slow. If this is the case then unfortunately you cannot do much other than changing your hosting provider.

Web Hosting Provider

Some of the best hosting provider that I recommend are listed below:

  • Hostinger
  • SiteGround
  • WPX
  • Kinsta
  • Cloudways

Verdict

WordPress is not much optimized for speed but with the few steps mentioned above, we can increase its speed drastically.

The mantra to good optimization is – Analyze > Monitor > Optimize.

I hope that this guide was useful in analyzing and increasing your WordPress site speed via multiple optimization methods. If you have any queries or suggestions, then please let me know in the comments down below.

Leave a Reply

Your email address will not be published. Required fields are marked *