AliveBetter’s Speed Optimization Guide (2019)

WordPress Speed Optimization

Site loading speed is considered to be one of Google SEO factors.

These days, there are many online tools which allow you to measure your or anyone else’s site loading speed. Personally, I use 5 of those tools: GTmetrix, Google PageSpeed Insights, Pingdom Tools, WebPageTest, and Dotcom-Tools.

In this guide, I will show you how you can go from results like these (or even worse):

How To Speed Up Your WordPress Website - 01

alivebetter.com - Pingdom - Sweden - 01

to these:

alivebetter.com - SiteGround GoGeek - GTmetrix 01

alivebetter.com - Pingdom London - no FB plugin - Clearfy

When it comes to WordPress speed optimization, it’s enough to use Kinsta or SiteGround combined with Astra, WP Rocket, and ShortPixel, and almost all of your loading issues will go away!

At the end of this article, I will show you one unbelievable, mind-blowing phenomenon which I’ve discovered just a few days before writing this guide. 🙂

 

1. Choose The Best Possible Hosting Provider

 

Your hosting provider is the first and one of the most important aspects of your website’s speed optimization. Some time ago, I have published an article with the list of the best hosting providers in the world. This list is still up-to-date.

Here are 4 hosting companies especially recommended by AliveBetter:

1. SiteGround.

2. Kinsta.

3. WPX Hosting.

4. Cloudways.

If you choose any of them and you will go through the next steps, you will achieve good results.

Besides great performance, 3 of these hosting companies (except Cloudways) provide very high security level!

However, if you wanted to host your site with Cloudways, there’s no problem. If you use BlogVault and a few security plugins from this list, you are protected well enough.

 

2. Choose The Best Possible WordPress Theme

 

Nowadays, there are thousands WordPress themes available online. Some of them are paid, some are free. Some time ago, I have even written an article about the best WordPress themes in the world.

But in this area, I have only one recommendation for you and I’m almost sure that you will be happy with it – it’s a free version of Astra theme.

Certainly, you can purchase a paid version of this theme if you’d like to add more features to it.

But In terms of performance, there is no better WordPress theme than Astra! Click To Tweet

 

3. Configure CDN (Cloudflare) In A Proper Way

 

Since the year 2016 (when I started blogging), I have tested a few CDNs such as: Cloudflare, MaxCDN, KeyCDN, BunnyCDN, Amazon AWS, Sucuri.

And here’s my view on CDNs:

Besides performance improvements, good Content Delivery Network should also provide high security level.

Obviously, you can choose whichever CDN you want, but from my point of view, Cloudflare provides the best relation between performance, security, ease of use, and pricing.

When it comes to activating Cloudflare, there are two ways to do it. You can do it with SiteGround’s client area (if you host your site with SiteGround) or by signing up on cloudflare.com.

The second of these two solutions is the way recommended by AliveBetter since it has one very big advantage. If you decide to change your hosting provider at any time in the future, you will be able to propagate your DNS settings in just a split of seconds! You will not have to wait long hours until your site is reachable again. Click To Tweet

You will just need to update your server’s IP address in Cloudflare DNS settings and clear the cache. Your site will start being served from the new server in less than a minute!

So, this is how you should configure Cloudflare in order to get maximum security and performance benefits:

 

DNS

 

Cloudflare configuration 01

An IP address on the screen above is the address of your server.

 

SSL/TLS

 

Cloudflare configuration 02

Cloudflare configuration 03

Cloudflare configuration 04

Cloudflare configuration 05

Cloudflare configuration 06

 

Speed

 

Cloudflare configuration 07

Cloudflare configuration 08

Cloudflare configuration 09

Cloudflare configuration 10

 

Caching

 

Cloudflare configuration 11

Cloudflare configuration 12

 

Page Rules

 

Cloudflare configuration 13

The 1st path on the screen above is my WordPress login page. If you’d like to change your login path, you should download and install WPS Hide Login, type in your path, and add it to the Page Rules tab as you can see above.

 

Network

 

Cloudflare configuration 14

Cloudflare configuration 15

Cloudflare configuration 16

 

Traffic

 

Cloudflare configuration 17

 

Scrape Shield

 

Cloudflare configuration 18

If you haven’t found one or more tabs in this section of the article, it means that there is nothing to set.

 

4. Reduce Number Of 301/302 Redirects

 

Both my blogs (www.alivebetter.com and www.alivebetter.pl) have SSL certificates (green padlock on the left-hand side of your address bar), hence their addresses begin with “https://” instead of “http://”. As you can see below, some time in the past, this blog had two 301 redirects instead of one.

alivebetter.com - redirects

This issue has been solved by SiteGround support. In order to solve a problem like this one, I needed to configure Cloudflare as it is shown in point 2 of this article, and add the following lines:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^alivebetter\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.alivebetter.com/$1 [R=301,L]

to .htaccess file.

This method worked fine with SiteGround a few years ago, but it failed with Cloudways when I tested it in 2019.

 

Majority Of Hosting Providers (Except SiteGround)

 

If you host your site with any Apache-based provider other than SiteGround, you should go to .htaccess file and add these few lines:

<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

at the beginning of the file.

In order to do that, go to WP File Manager plugin, right-click .htaccess file, and choose Code Editor from the menu.

htaccess edit 01

htaccess edit 02

Now, you can click Save & Close and clear the cache on both your server and Cloudflare.

 

SiteGround

 

If you host your site with SiteGround, you just need to enable HTTPS Enforce.

That’s all!

This option is available in SiteGround Site Tools and in SG Optimizer plugin.

 

Kinsta

 

If you host your site with Kinsta, you need to install an SSL certificate and force HTTPS.

More details in this topic are available in my comparison of 4 best hosting providers.

 

5. Optimize (Compress) Images

 

Compressing images is a very important factor of speeding up your WordPress website. There are a few popular WordPress plugins for that purpose, such as: EWWW Image Optimizer, Imagify Image Optimizer, Kraken.io Image Optimizer, WP Smush.

My favourite plugin for optimizing images is ShortPixel Image Optimizer and I can recommend it to everyone! Although majority of the photos on this website had been optimized online with tinyjpg.com, then with a WP Smush plugin, ShortPixel managed to reduce their sizes about 25-30% without any noticeable loss of quality!

ShortPixel statistics 2018

 

6. Install And Configure The Best Possible WordPress Caching Plugin

 

These days, there are a few quite good and very popular WordPress caching plugins such as W3 Total Cache, WP Fastest Cache, and Autoptimize.

However, in this section of the guide, I will show you one paid WordPress plugin which works perfectly. This tool is called WP Rocket and this is the plugin installed on both version (PL and ENG) of AliveBetter blog.

The cheapest version ($49) of WP Rocket can be installed on one website only, the most expensive one ($249) is for unlimited number of websites.

WP Rocket 2019

After choosing the cheapest or medium package, you will be able to upgrade to higher package(s), and you will pay only the difference between your current and the future package.

WP Rocket 2019 upgrade license

If you’d like to renew your licence before the end of the first year, you can get even more than 50% discount!

WP Rocket 2019 renew license

WP Rocket is the tool which helped me achieve the best results in terms of speed. You can find them in one of the following sections of this article.

Below, you can see an optimal WP Rocket configuration:

 

Dashboard

 

WP Rocket 2019 01

 

Cache

 

WP Rocket 2019 02

 

File Optimization

 

On this tab, you should check every possible option. When you do this, clear cache using the second from the top option of WP Rocket menu, then log into your hosting provider client area and clear the cache there, and log into your CDN dashboard and also clear the cache.

After all these steps, open any web browser and check whether your site isn’t visually broken (you may need to check it in a private window – Ctrl + Shift + N if you use Opera or Chrome, Ctrl + Shift + P in case of Firefox).

In case if it was, go back to WP Rocket settings, uncheck the first option from the top (on File Optimization tab), clear the cache again and check your site again.

Repeat these steps until you find the best possible settings for your hardware and software configuration.

WP Rocket 2019 03

The next step is very important in the process of speeding up websites.

If you check Optimize CSS delivery option, you should add some code in a field described as Fallback critical CSS.

In order to generate that code, you should visit SiteLocity’s Critical Path CSS Generator.

There, you need to type in your domain name and click the green button below.

SiteLocity's Critical Path CSS Generator 01

SiteLocity's Critical Path CSS Generator 02

After a while, you will get a code (shown above) which you should copy and paste into the field mentioned earlier and shown on the screen below.

WP Rocket 2019 04

WP Rocket 2019 05

 

Media

 

WP Rocket 2019 06

 

Preload

 

WP Rocket 2019 07

 

Database

 

There is completely nothing to configure on the Advanced Rules tab so I decided to skip it.

WP Rocket 2019 08

WP Rocket 2019 09

 

CDN

 

This tab is helpful for those who want to use a CDN other than Cloudflare and Sucuri.

In such a case, you need to check Enable Content Delivery Network and paste your CDN’s CNAME (which you can find after logging into your CDN dashboard) in the field below.

WP Rocket 2019 10

 

Heartbeat

 

You can completely disable Heartbeat’s activity, but remember to check whether your site works properly after this step.

WP Rocket 2019 11 01

 

 

Add-ons

 

Add-ons should be activated according to your needs.

In my case, it is Google Tracking and Cloudflare.

WP Rocket 2019 12

WP Rocket 2019 13

Global API key and Zone ID are available after you log into your account on cloudflare.com.

WP Rocket 2019 14

Image Optimization tab recommends using Imagify plugin for compressing images.

However, according to my tests of various image optimizers, ShortPixel brings the best results and it perfectly satisfies all website loading testers.

 

7. Fix Mixed Content Issue If It Occurs

 

Mixed content is a very common issue which occurs on millions of websites around the world. I’m pretty sure you have seen such an issue many times before.

Mixed content occurs when a site has an active SSL certificate and is loaded with https “prefix”, but some elements are still loaded through http.

Here are some examples of such an error.

And here are the solutions:

If your site is hosted with SiteGround and you have enabled HTTPS Enforce like I recommended you earlier, the issue probably does not occur.

If it occurred anyway, there is a simple solution which allows you to fix the problem with just a few clicks.

SiteGround - SG Optimizer - fix mixed content issue

If your site is hosted with Kinsta, you will have to use Search and replace tool. More details are available in another article.

If your site is hosted with any other company, you will have to use Search & Replace WordPress plugin. The complete solution was described in this article.

 

8. Install And Activate Clearfy (An Alternative To Perfmatters)

 

Perfmatters is the most frequently recommended paid plugin which allows its users to disable some unneeded WordPress features.

But do you really have to purchase another paid plugin in order to maximize your results?

The answer is ‘no’.

Some time ago, I have created the article with comparison of Clearfy and perfmatters.

However, I haven’t mentioned about one strange and interesting thing there.

I purchased perfmatters in the first half of October 2019, my PayPal account was charged immediately, but I haven’t received any license key.

Customer support was not answering my questions.

After more than 5 weeks, Brian Jackson (who is an employee of Kinsta, a founder of perfmatters, and the owner of woorkup blog) reached me out with the information that my purchase and my enquiry have landed in their spam folder 😮 😮

After receiving my license key, I decided to test that plugin anyway. The results are available in the article which I have linked to above 🙂

Although Kinsta, WP Rocket, and ShortPixel are amazing services which are worth the money, perfmatters (at least in my opinion) is not…

Keep reading this article and read my comparison of perfmatters and Clearfy, and you will understand why I think so.

 

AliveBetter’s Speed Tests Results

 

Before writing this article, I went through all the steps described above and I can see that they work.

Here are my speed tests results achieved just a few days before writing this guide (and obviously after going through the steps described in this guide):

 

GTmetrix

 

alivebetter.com - SiteGround GoGeek - GTmetrix 01

alivebetter.com - SiteGround GoGeek - GTmetrix 02

alivebetter.com - SiteGround GoGeek - GTmetrix 03

 

Google PageSpeed Insights

 

alivebetter.com - SiteGround GoGeek - PageSpeed Insights desktop

alivebetter.com - SiteGround GoGeek - PageSpeed Insights mobile

 

Pingdom Tools

 

alivebetter.com - SiteGround GoGeek - Pingdom - London

alivebetter.com - SiteGround GoGeek - Pingdom - San Francisco

 

WebPageTest

 

alivebetter.com - SiteGround GoGeek - WebPageTest

 

Dotcom-Tools

 

alivebetter.com - SiteGround GoGeek - Dotcom-Tools

 

Currently, my speed tests results may be slightly worse than these from the screenshots since I activated Mongoose Page Plugin again.

As you will see in a while, site loading speed is not as important as many people suppose it should be.

 

An Interesting Phenomenon (What Is The Impact Of Site Loading Speed On Google Search Results)

 

Now it’s time for the most interesting question.

How does page loading speed impact your ranking?

In order to answer this question, I will show you a few real-life examples.

Brian Dean’s Backlinko is a great site which, according to speed tests, is quite poorly optimized.

backlinko.com - GTmetrix

backlinko.com - PageSpeed Insights desktop

backlinko.com - PageSpeed Insights mobile

However, according to SimilarWeb, it gets 700,000-800,000 monthly visitors!

But that’s not all!

Let’s take a look at even more interesting example!

“how to make money online” is a quite competitive phrase which according to KWFinder has a keyword difficulty 47/100 and more than 200,000 monthly searches on Google.

how to make money online - KWFinder

Let’s now check top 5 pages’ loading speed results.

 

entrepreneur.com

 

entrepreneur.com - GTmetrix

entrepreneur.com - PageSpeed Insights desktop

entrepreneur.com - PageSpeed Insights mobile

 

ryrob.com

 

ryrob.com - GTmetrix

ryrob.com - PageSpeed Insights

ryrob.com - WebPageTest

 

moneyunder30.com

 

moneyunder30.com - GTmetrix

moneyunder30.com - PageSpeed Insights mobile

moneyunder30.com - WebPageTest

 

goodfinancialcents.com

 

goodfinancialcents.com - GTmetrix

goodfinancialcents.com - PageSpeed Insights

goodfinancialcents.com - WebPageTest

 

adamenfroy.com

 

adamenfroy.com - GTmetrix

adamenfroy.com - PageSpeed Insights mobile

adamenfroy.com - WebPageTest

As you’ve just seen above, Most of top ranking sites are poorly optimized in terms of loading speed... Furthermore, this example shows that 4 out of 5 top ranking pages have wrong-implemented (usually double 301) redirects! 😮 😮 Click To Tweet

 

One Example Of A Well-Optimized Site

 

Now, I will show you one example of well-optimized site which I found while I was checking the results one after another.

That site is budgetboost.co.

budgetboost.co - GTmetrix

budgetboost.co - PageSpeed Insights mobile

budgetboost.co - WebPageTest

Although this site is well-optimized, it ranks quite low (the spot number 15).

KWFinder - how to make money online - budgetboost.co

The reason why slower websites rank higher than the fastest one is simple - top 3 Google ranking factors are: domain authority, page authority (these two can be summed up as backlinks), and content quality. Click To Tweet

 

WordPress Speed Optimization – Quick Summary

 

As you’ve just seen above, site’s loading speed has a very low impact on Google ranking.

However, now I have to repeat what I’ve written at the beginning of this guide:

When it comes to WordPress speed optimization, it’s enough to use SiteGround, Astra, WP Rocket, and ShortPixel, and almost all of your loading issues will go away! Click To Tweet