How to Boost WordPress Performance today : 7 Effective Ways

WordPress performance

The Ultimate Guide to Analyze and fix Performance of Your WordPress Website

At CollectiveRay we’re always looking for ways of making our websites faster. Our website loads FAST. Really really fast! And we want your websites to perform fast too. That’s why today we’ve opted to publish an article that focuses on WordPress performance.

Contents[Show]

You might already know that WordPress performance is critical to the success of your website. Studies have shown that users will start abandoning your website if it doesn’t load within 3 seconds.

In particular, people browsing to sites from their mobile devices typically have slower connections, especially if they are on data plans and tend to have much less patience with slow sites.

eCommerce sites also lose sales when the performance of the site is slow.

According to a study, if a site is delayed for a second, the conversion rate will be reduced by 7%. Suffice to say WordPress performance is one of the things you’ll need to focus on if you want your website to be successful.

wordpress performance infographics

Most WordPress websites are not maximizing their full potential

Even though WordPress is a great blogging platform and CMS, the harsh reality is most websites are not maximizing its full potential. It is mainly because most website owners aren’t techies who could analyze WordPress performance, understand the problem areas and take necessary actions to boost WordPress performance.

If you’re not sure whether your site is at its full potential, simply copy the below code and paste it into your footer.php file.

<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>  seconds.

footer code

In your footer, it will now display how long a page takes to load and how many MySQL queries the page is executing.

Top Tip: Not sure about all the technical stuff? You might want to hire a WordPress developer - our guide will help you find the right one.

1. How to find and fix a WordPress Performance drop

Before implementing various tactics that can help to boost WordPress performance, it is always better to scan your WordPress website, analyzing performance issues and checking what is causing a performance drop.

Once you’ve identified the issues, the next step is to fix them to remove the bottleneck.

Many plugins will help you analyze WordPress performance. In the past, we used to recommend P3 (Plugin Performance Profiler) for that purpose, but this plugin has not been updated for the last 5 years as at the time of updating of this article. 

Going forward, we are now recommending a new plugin to diagnose performance problems: Query Monitor. This is a great tool, that is in active development and is able to diagnose performance drops in various ways.

Note: Before going further, make sure you take a backup of your site, so that just in case something goes wrong, you can easily revert to the previous version. We will be recommending drastic changes to your site, so do ensure you have a full working copy before you start tinkering. Even minor changes can break your site, or you could have a plugin that makes a change you are unable to revert. TAKE BACKUPS!

Recommended Reading: How to backup WordPress natively or with a plugin

Query Monitor

query monitor iconAs we have mentioned, this tool is great because it can diagnose a variety of performance problems including:

  1. Problems caused by slow plugin queries
  2. Poorly performing plugins, themes or functions
  3. PHP errors causing performance issues
  4. Block editor blocks causing problems
  5. Environment problems such as PHP issues

The plugin is very neatly organized, where information is grouped by plugin or theme so you can quickly identify performance drops or plugins that are causing too much overhead.

The first thing you'll notice when you install and active the plugin are measurements of the time it takes to render the current page in the top bar of the WordPress admin:

query monitor bar

Identify Slow Components

We then click on the top bar and select Queries >> Queries by Component. What we see in this screen is a full listing of each installed plugin and how much time they are "spending".

For example, in the screenshot below, we can see the revslider component, is the largest performance hog after the core WordPress functions:

query monitor queries by component

What should you do with results?

At this point, it is up to you to decide whether the component is important to your website, given its impact on the performance of the site. You can perform such an evaluation on each component of your site. 

In particular take a look at the ones that are clearly performance hogs, i.e. they are consuming the most time when it comes to queries. If you are serious about performance, you should disable that plugin, either replacing the component by one which performs better, changing the functionality, or tweaking the settings of the plugin such as to make sure that it is operating at peak performance.

In general, you might want to get in touch with the vendor of any slow plugins, let them know about your performance problem and see whether there are any actions that you could take to improve performance.

Identify Excessive Scripts

Another section of Query Monitor you should look at is the scripts function. While Javascript is an essential component of WordPress, the sheer number of different scripts being used by various themes and plugins that we need is creating a serious performance impact on most websites today.

You'll notice that sites such as Pagespeed Insights actually warn you about this and that you should consider reducing the JS payloads.

javascript execution time

Click on the Scripts to see how many scripts are being used by your website. While many of these scripts are part of the core functions, check that you need ALL of these scripts, or maybe there are things you are no longer using that you can remove.

This also goes for the Styles, or the CSS stylesheets in use. Check for any stylesheets that are getting added to the output that you no longer need.

Finally, click on Environment to check whether there are infrastructure issues that are holding your website's performance back. For example, we can see that this website has not yet upgraded to the latest versions of PHP.

PHP 7.0.33 is today a relatively old version of PHP and later versions such as PHP 7.3 can execute and thus perform many times faster.

query monitor environment issues

P3 (Plugin Performance Profiler)

p3 before scanning

We are going to keep this content here for legacy reasons and because P3 profiler is still a valid troubleshooting plugin in some cases, even though it is no longer maintained by GoDady.

Poorly configured plugins are one of the main reasons that adversely affect WordPress performance.

That is why we need a tool such as P3, the WordPress performance profiler plugin. The idea behind P3 is that it actually analyzes the execution time of each WordPress plugin and then presents to you a graph with executions times.

This allows you to see which plugins you need to focus most of your attention on.

A while back one of our WP websites started to degrade in performance. Each hit was taking 10 to 15 seconds to execute.

After installing P3 we found that one of the plugins taking more than 8 seconds to execute. It was something which we could do without, so we killed it without any hesitation.

Boom. Site loading back to normal.

This is a perfect example of how you can use WordPress performance profiler.

Let’s see how to work with P3 to troubleshoot WordPress performance.

Once you’ve installed the P3 plugin, click ‘P3 Plugin Profiler’ tab, under Tools menu. Click the ‘Start scan’ button>> Auto Scan.

Once the scanning is over, click ‘View Results’ button.

Instead of automatic scanning, you can choose a manual scan if you want to analyze the background performance of a specific page.

Instead of clicking the ‘Auto Scan’ button, click ‘Manual  Scan’ in the above step.

manual scan

After that, click the links and pages of your site, and the scanner will analyze the speed and resource usage of all of your active plugins on a particular page. Once the scan is complete, you would see a "View Results" button. Click it.

P3 scan results

Now you’ll get detailed insights like plugin load time, how much they impact on total load time and database queries per visit.

P3 detailed scan results

What to do with the results

The main benefit of using the P3 plugin is that you can email the results to yourself, your developer or your support team, so they can easily identify the real issues that cause the performance drop. You’ll find this feature very useful especially if you’re not a programmer who could analyze the issues by yourself.

email results

If you’re suspecting a plugin or a theme feature for performance drop, you can run the P3 scanner to determine the issue. Since P3 has an extensive help section, you could easily figure out what causes slowness besides plugin and many other FAQs. So even if you’re not sure what the numbers are telling, you could interpret the results with the help section

Aside from looking at the plugin issues, you may also want to check these guides, which helps you find and fix vulnerabilities in your WordPress themes:

You can also find more WordPress tips for website owners in the relevant menu above.

So far we’ve seen how to analyze WordPress performance with P3 plugin. Now let’s take a look at various WordPress performance optimization methods that will help you speed up your server response time and improve page speed performance.

2. Improve WordPress performance through image optimization

walmart

Optimizing WordPress images is an essential part of improving WordPress performance because images often account for most of the downloaded bytes on a web page.

Below are a few ways to optimize WordPress images.

Image compression

The size of the images on your site will have a strong influence on the page loading speed. Before uploading an image to your website make sure you save it in a way that is compressed for websites. For example, Photoshop has a function called Save for Web, that compresses images without losing quality. Use this or a similar way of uploading smaller versions of images.

You can also opt to use a plugin that compresses images automatically, such as WP Smush IT.

Lazy Loading of Images

Both Chrome and WordPress 5.4 plan to introduce lazy loading of images by default. However, if your website is not running a recent version of WordPress you should consider installing a lazy loading plugin. A3 Lazy Load is a good plugin that is actively maintained as at the time of writing of this article.

To explain this concept, it is a feature where images are loaded only when a user starts to scroll or is about to see an image. This means that the website does not suffer the performance impact of having to load all the images as soon as a user hits the website.

If you’re using too many images on a web page, this is an essential feature to improve performance.

Use the correct image format

GIF, JPEG, JPG and PNG are the most popular image formats. Since each format has its characteristics and benefits, using the right one can help to improve page speed. In general, PNG store the highest amount of information and are typically the best quality (but also the largest). JPG images are a good middle ground that offers good compression and good quality.

Convert your images to WebP

WebP is a new image format that is gaining support from the major browsers and is one of the recommended optimizations from Google's Page Insights performance tool. While up to a few months ago, converting images to WebP was a headache, recently a new plugin was released that enables the conversion of WordPress images to WebP. Find the plugin here.

Make effective use of the browser cache

Another effective way of improving WordPress performance is by instructing browsers to keep CSS, Javascript and image file longer than usual. The benefit is that it will ultimately reduce the loading time even when your visitors return after a long period. We've got a great article on how to leverage browser caching for WordPress here.

If you're looking for more effective ways of improving WordPress performance you might want to look at WP Rocket - a premium plugin whose sole reason for existence is to make websites load faster.

Make your WordPress Faster 

3. Deliver resources faster by using a Content Delivery Network (CDN)

A CDN is a network of multiple servers distributed throughout various locations around the globe to increase page speed and user experience. The CDN caches the static content and files of your site and delivers to your site visitors based on their geographic locations through a server that is closest to them.

By making the heavy content (such as images, CSS and JS files) load from a location that is physically closer to the end-user, the website pages will load much faster in general.

how a cdn works

At CollectiveRay, we use and recommend StackPatch, formerly MaxCDN. Alternatively, if you’re after a free CDN, read 11+9 Free / Premium CDN WordPress Services to Boost Your Website Speed our article which we update often with the best services out there.

Check out StackPath CDN

4. Use a cache plugin to decrease server load and boost WordPress performance

A cache plugin improves the WordPress performance by generating static files from your dynamic WordPress website. Once the static page is generated by the plugin, your webserver will serve that file instead of processing a comparatively heavier dynamic WordPress PHP scripts.

Once again, we must suggest WP Rocket, the plugin that we install on every WordPress website we maintain because it takes away so many performance headaches.

(You can even see it installed on the site where we feature the Query Monitor screenshot above and below - the same site)

wp rocket wordpress cache

 

There are other caching plugins you might want to opt for, but these are not as effective (holistically) as WP Rocket. Also, for such an important part of your website such as performance, you're better off with a good, premium caching plugin.

It even supports many of the features that we discussed above such as:

  • Image optimization
  • Caching of pages and PHP code (OpCache)
  • LazyLoading of images and WebP integration
  • Optimization of files and reduction of file sizes
  • Optimization of website database and reduction of bloat
  • Leveraging browser caching
  • Defer of Javascript files
  • GZip compression of website content
  • ... and many other features

For a more detailed look, learn how to get a super-fast WordPress website today- 21 actions.

5. Split your long posts into multiple pages

You might have already noticed it-- Some websites prefer publishing their long-form articles by splitting them into multiples pages. The best thing is that it helps improve loading time because the whole page isn’t loaded at once.

post pagination

But, did you know that splitting a long page into multiple pages is a built-in functionality of WordPress?

All you need to do is to add <!––nextpage––> tag in your article wherever you want to open a new page.

6. Split comments into pages

Blogs are not monologues. They are built for having two-way conversations with your readers through blog comments.

Having said that, publishing tons of comments on your blog post could worsen the performance of your site.

For that reason, many bloggers disable commenting on a post after a few days of publishing it

If you’re concerned about page speed, instead of disabling comments, you could split your comments into different pages.

How would you do that?

paginate comments

Just navigate to Settings>> Discussions and check the box next to ‘Break comments into pages’.

7. Disable Hotlinking

Hotlinking is a process of stealing your bandwidth. For example, some content scrapers steal your images by not uploading your images on their servers but serving them directly from your website. As a result, they steal your bandwidth but you don’t get any visits at all.

You can easily avoid hotlinking by adding the below code to your .htaccess file.

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?your-domain-name [NC]

RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Thanks for reading! If you want a quick guide on optimizing your WordPress site for performance, this great guide on how to optimize WordPress websites for speed is a must. Want more? For more WordPress tricks like this, you may refer to this guide: 101 WordPress Tricks to Every Serious Blogger Must Know.

WordPress Performance Plugin

For many of you out there, debugging performance problems and making their website faster is not their cup of tea, and obviously, this is why we've come up with this article, we're trying to make this a little bit easier for you guys.

But what if we told you there's an even easier way to make your website faster? With just a few clicks you can fix most of your performance problems and make sure they never actually come back.

That fix is WP Rocket. This is a WordPress performance plugin which has been written specifically for WP and is proven to remove all kinds of bottlenecks from most websites.

It handles such stuff as

  • File and database caching
  • Image optimization
  • Browser caching
  • Removing dead plugins and their tables
  • Optimizing database tables
  • Lazy loading
  • Integration with a CDN
  • GZip compression (read more about how to enable GZIP compression manually here)
  • and plenty of other optimizations

It's not free, but it's well worth the investment. After all, a fast website is going to be beneficial to both you as the website owner and most importantly, your visitors and prospective clients.

Check out WP Rocket

Frequently Asked Questions

How can I increase my WordPress performance?

To increase WordPress performance you need to first identify what is causing your site's performance problems. Slow, cheap shared hosting is a significant culprit, so first and foremost you'll want to plan to upgrade your hosting. Then implement a plan of action of doing the following:

  1. Reduce WordPress plugins
  2. Reduce external 3rd party scripts
  3. Reduce large image sizes or use optimal formats such as WebP
  4. Enable GZip compression
  5. Enable browser caching
  6. Implement defer parsing of Javascript
  7. Set up a caching plugin such as WP Rocket
  8. Upgrade to the latest PHP version
  9. And finally, set up a CDN.

Is WordPress slow?

WordPress is not slow by default. However, if you have too many plugins installed, a lot of traffic and poor website hosting, your WordPress will eventually start slowing down. You'll first need to identify where your performance bottleneck lies then act accordingly.

How can I speed up my WordPress site?

There are several actions you can take to speed up your WordPress site. The most effective actions you can take are:

  • Upgrading your hosting plan
  • Upgrade to the latest PHP version
  • Install a WordPress caching plugin

How can I speed up my WordPress site without a plugin?

You can actually speed up your WordPress site without a plugin. The easiest ways to do this are the following:

  • Upgrade your hosting plan
  • Upgrade to the latest version of PHP
  • Implement GZip compression through the Optimize Website function of your website
  • Implement browser caching through .htaccess file tweaks
  • Set up a CDN if you can, especially if you have website traffic from all over the world

Need help getting WordPress fast? Try these top-rated affordable gigs on Fiverr!

fiverr logo

Click here to find experts on WordPress speed optimization.

Click here to create a full WordPress website.

Conclusion: what more can we do to optimize WordPress Performance

What are your favorite tricks to boost WordPress performance? Share your thoughts with us by dropping a line below in the comments section.

About the Author
Shahzad Saeed
Author: Shahzad SaeedWebsite:http://shahzadsaeed.com/
Shahzaad Saaed has been featured in a large number of authority websites, as a WordPress expert. He specializes in content marketing to help business grow their traffic.

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.

Author(s) Featured On:  Inc Magazine Logo   Sitepoint logo   CSS Tricks logo    webdesignerdepot logo   WPMU DEV logo   and many more ...