Optimize WordPress Speed • How To Load WordPress Fast

[read_meter]

Table of Contents

Are you obsessed with website speeds?

Designing a beautiful WordPress website is one thing, but to make it load fast, that’s another.

After years of building client sites and perfecting the speed formula, I’m finally sharing the secret.

Spoiler, there’s no secret, it’s a simple trial and error thing, feel free to copy this exactly or use it as a blueprint for you to work from.

https://p146.p4.n0.cdn.getcloudapp.com/items/xQu62AKq/a76df9a9-82d5-404c-b9d8-8bc6cef6bd73.jpeg?v=05d384f238b319fd83944d605bff158c

See the live report via GTMetrix.

Disclaimer, this is not a step by step guide. If you need help setting up your website, see How To Setup Your Own Website. Before making any changes, make sure you have a backup of your website and are in a development environment to ensure you do not break anything.

0. Mindset

Before we get into the nitty-gritty, let’s just talk broadly. Only have what you need on your website. Don’t upload countless images, plugins or themes just for the sake of it.

1. Hosting – Cloudways

Easily the most important aspect of website speed is the computer, or server which stores the web files. This is your web host, there’s good web hosting companies out there. However, I recommend Cloudways.

Specifically, the Cloudways Vultr High Frequency web servers. If interested, see my comparison on why this is a good option.

So, you’re using Cloudways? Great! Now how do you configure the server? Let’s take a look.

Here’s the Managing Services:

https://p146.p4.n0.cdn.getcloudapp.com/items/P8uGoy00/82312f05-266f-4cc7-b8b0-a882a144c4ab.jpeg?v=622aade8249e10f47ae905354e6739d1

Go to Settings & Packages, Basic. Make sure to increase the Memory Limit.

https://p146.p4.n0.cdn.getcloudapp.com/items/4gulqlqK/544b49e0-bc9e-42a3-bcef-2fdd7f205ca4.jpeg?v=85f66d493b648ea2948b5873e7d48318

Now go to Advanced, PHP.

https://p146.p4.n0.cdn.getcloudapp.com/items/v1u070pl/7d18967e-2dce-477b-a364-2096993e7df4.jpeg?v=5c48b88e8c16bb684a566414df6fc96a

While still in Advanced, scroll to MySQL, NGINX and Varnish. Add Cloudflare to the WAF Module, this will come in handy soon.

https://p146.p4.n0.cdn.getcloudapp.com/items/rRubYbeG/40ec0e73-be64-4341-9d11-3042e3ec6ea4.jpeg?v=a28222d5764d884c998a07f2e9ffd5eb
https://p146.p4.n0.cdn.getcloudapp.com/items/geuAGANL/705ef90e-34bc-4279-9540-ee79c0187fad.jpeg?v=657692293ef95b6077c5d7f9dc29430f

Now go over to Packages and update PHP and MySQL. It’s always a good idea to run the latest, stable version of these coding languages for your websites.

https://p146.p4.n0.cdn.getcloudapp.com/items/KouJX7my/d5ecf630-4b50-4c43-954d-9d123c3596a5.jpeg?v=951abdf3a29094622f74d2a920e8f27a

2. Content Delivery – Cloudflare

Let’s add an amazing connection layer to your website in the form of a Content Delivery Network (CDN) via Cloudflare. It’s an amazing service that won’t cost you anything, yes, it’s free and adds a level of privacy and security to your website.

If you’re not using Cloudflare, it’s as simple as creating an account, adding your domain and updating your name servers via your domain host. If that didn’t make sense, see How to Use Cloudflare CDN on Cloudways.

Go to Speed, Auto Minify and Brotli, tick the following boxes.

https://p146.p4.n0.cdn.getcloudapp.com/items/z8urj1XD/016a79de-268b-4012-a5b6-cd06387338cc.jpeg?v=a815c3b936400f99e7b35d7103d7902b

Then, go to Rules, Page Rules and apply the following 3 rules.

https://p146.p4.n0.cdn.getcloudapp.com/items/7KuEGAR5/0b86c929-01ce-4e88-8801-721f44e3bc3f.jpeg?v=ca5820f5ada6efb97f6701e13847fe4c

It’s a good idea to purge the cache after making these changes.

For a deeper dive into Cloudflare, see Caching WordPress Pages using Cloudflare Page Rules.

3. WordPress – Plugins and Themes

WordPress alone is actually good at its speed, the community of contributes and developers who build and make WordPress are always improving it.

It’s a good idea to update to the latest version of WordPress.

For your WordPress theme, there’s a lot of options, I recommend Astra, OceanWP or GeneratePress. If you’re building a pure Elementor WordPress website (which I do), use Hello by Elementor.

WordPress Caching – Breeze

There’s a lot of plugins that achieve this, I’ve tried most of them, I keep coming back to Breeze by Cloudways. It’s a free, simple (yet powerful) and user-friendly WordPress Caching Plugin developed by the Cloudways team.

When editing each section of Breeze, make sure to select Save Changes as you go.

Go to Settings, Breeze, Basic Options. Tick the following options, Cache System, Minification, Gzip Compression and Browser Cache.

https://p146.p4.n0.cdn.getcloudapp.com/items/L1urAeQ8/7b0246b8-2a2d-4ead-8683-c32c0d67a268.jpeg?v=1b339899e6fcd03ae816c654a192faf4

Now go to Advanced Options and check Lazy-load images and Group Files for CSS and JS.

https://p146.p4.n0.cdn.getcloudapp.com/items/YEuO2PXz/052f7b15-d3ee-4a6c-b5f5-ef3b02a5f46b.jpeg?v=2808c543a5bc48cd0b8e76f03fb342af

Then go to the CDN tab and select the Activate CDN option.

https://p146.p4.n0.cdn.getcloudapp.com/items/NQuY07oq/eee50db9-e3da-497f-bb1a-0636147d0018.jpeg?v=8079b206e9875be864546d95f95d0528

Lastly, go to Varnish and select the Auto Purge Varnish option.

https://p146.p4.n0.cdn.getcloudapp.com/items/GGupg4WJ/96949fa4-e878-4717-97bf-afd58a51f683.jpeg?v=ff504f3b28e7c1c72ae02e32d2805ad4

WordPress CDN – Cloudflare

Now you’ve already set up Cloudflare, you don’t need to do that again. But there’s a Cloudflare Plugin developed by the Cloudflare team built for WordPress. See their Installation section for how to set this plugin up on your website.

To configure this plugin, go to Settings, Cloudflare, Settings and tick Always Online and Auto Purge Content On Update.

https://p146.p4.n0.cdn.getcloudapp.com/items/Apu9bEx6/f197436e-41b5-4408-b931-aa65366288d0.jpeg?v=6a023d729654a4dbff23aedcd2818dec

WordPress Images – ShortPixel

There are some good options out there, I like ShortPixel, a freemium, easy to use, comprehensive, stable and frequently updated image compression plugin. See their Installation guide for more details on setup.

It’s a good idea to manually compress images before you upload to WordPress and let ShortPixel do the rest.

Go to Settings, ShortPixel, General and apply the following settings.

https://p146.p4.n0.cdn.getcloudapp.com/items/NQuY07jA/9863fc80-84c4-4fe7-8313-f5712c654502.jpeg?v=fd6bd17ded1f9d49d389552d7af83afa

Then, go to Cloudflare API and add settings there.

https://p146.p4.n0.cdn.getcloudapp.com/items/KouJX7nG/6d7f8c00-d1f3-4892-ba53-f3074d121515.jpeg?v=fa26a1cd3249af41454c5ecdbd27f24c

ShortPixel is awesome, just for fun, here’s how much bandwidth I’ve saved while using it.

https://p146.p4.n0.cdn.getcloudapp.com/items/Apu9bEel/bc0166b1-2f78-492b-9a3a-570e98202662.jpeg?v=3e988735c24c09cd997ae6861555232c
About The Author
Mr Ash

Mr Ash

“Learn, create, share, repeat.” • IT teacher, former web designer, learning CyberSec • Road to #100DaysOfHacking on Hackers Learning Path.
Share This Article
LinkedIn
Twitter
Facebook
WhatsApp
Email

The Monthly Monitor

An accountable newsletter about productivity, cybersec, & hacking. No spam, unsub anytime.

By entering your details, you agree to the Terms & Policies.
Leave A Comment

Leave a Reply

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

More Content

The Monthly Monitor

An accountable newsletter about productivity, cybersec, & hacking. No spam, unsub anytime.

By entering your details, you agree to the Terms & Policies.

This site uses cookies and other tracking technologies to assist with navigation, monitor site usage and web traffic, assist with our promotional and marketing efforts, and customize and improve our services, as set out in our privacy policy