Optimize WordPress Speed • How To Load WordPress Fast

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/xQu62AKq/a76df9a9-82d5-404c-b9d8-8bc6cef6bd73.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/P8uGoy00/82312f05-266f-4cc7-b8b0-a882a144c4ab.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/4gulqlqK/544b49e0-bc9e-42a3-bcef-2fdd7f205ca4.jpeg?w=800&ssl=1

Now go to Advanced, PHP.

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/v1u070pl/7d18967e-2dce-477b-a364-2096993e7df4.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/rRubYbeG/40ec0e73-be64-4341-9d11-3042e3ec6ea4.jpeg?w=800&ssl=1
https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/geuAGANL/705ef90e-34bc-4279-9540-ee79c0187fad.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/KouJX7my/d5ecf630-4b50-4c43-954d-9d123c3596a5.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/z8urj1XD/016a79de-268b-4012-a5b6-cd06387338cc.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/7KuEGAR5/0b86c929-01ce-4e88-8801-721f44e3bc3f.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/L1urAeQ8/7b0246b8-2a2d-4ead-8683-c32c0d67a268.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/YEuO2PXz/052f7b15-d3ee-4a6c-b5f5-ef3b02a5f46b.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/NQuY07oq/eee50db9-e3da-497f-bb1a-0636147d0018.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/GGupg4WJ/96949fa4-e878-4717-97bf-afd58a51f683.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/Apu9bEx6/f197436e-41b5-4408-b931-aa65366288d0.jpeg?w=800&ssl=1

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://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/NQuY07jA/9863fc80-84c4-4fe7-8313-f5712c654502.jpeg?w=800&ssl=1

Then, go to Cloudflare API and add settings there.

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/KouJX7nG/6d7f8c00-d1f3-4892-ba53-f3074d121515.jpeg?w=800&ssl=1

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

https://i0.wp.com/p146.p4.n0.cdn.getcloudapp.com/items/Apu9bEel/bc0166b1-2f78-492b-9a3a-570e98202662.jpeg?w=800&ssl=1
About The Author
Ashley Ball

Ashley Ball

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

Monthly Newsletter

Learn about cyber security, hacking guides & python programming.

Leave A Comment

Leave a Reply

Your email address will not be published.

More Content

Monthly Newsletter

Learn about cyber security, hacking guides & python programming.

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