WordPress is a very powerful and popular Content Management System (CMS). It currently powers over 38% of all the sites on the internet. That means every one in three sites that you visit is most likely running WordPress. Sites like EA, CBN, ESPN, and even The White House, all use WordPress to power their sites.
I personally think WordPress is the best solution for business owners and even enterprise sites when it comes to simplifying the online marketing of their website.
A slow website
Even though WordPress is super popular, using it can also come with a price. And that price is performance. WordPress was initially created as a blogging platform. But it has evolved into much more than that. With that evolution comes the need for more functionality. And with so many different configurations out there, WordPress can run quite slow if not set up correctly. 🐌
A slow website will always be very detrimental to a visitor’s experience. It can play a significant factor in your bounce and conversion rates. The days of dial-up are long gone, and people don’t have the patience they used to. If they’re stuck on a page waiting for 5 seconds, they’re most likely going to hit the back button and pick the next search engine result to find what they’re looking for.
In my experience, a recommended website load time is 1.5 seconds or less. If your website takes longer than this, then you’ve probably got some optimization that can be done. In fact, Google has stated that mobile page speed is a ranking factor. This means it can have an impact on your site’s SEO.
The first thing you should do right now is testing your WordPress site’s speed. This will give you a benchmark for starting out. I recommend the free Pingdom speed test tool. Due to caching and CDNs, make sure to run the test at least three times to get a proper result.
Speed up WordPress
In this post, I want to cover, step by step, exactly how I configure all my WordPress sites and how you can easily achieve speeds of under one second load times.
First, a little bit about me: I have spent over 11 years using WordPress. I previously worked for Kinsta; a high-performance managed WordPress hosting company. And before that, I worked for KeyCDN, a global content delivery network. So performance is in my blood.
I have spent thousands of hours optimizing WordPress sites to ensure that they are running at optimal performance. As an internet marketer, WordPress has helped me achieve amazing things, and it can also help you! Just follow the steps below to speed up WordPress instantly.
I promise you, no matter what your background or level of expertise, you will find something in my post that is useful.
- Invest in fast WordPress hosting
- Content Delivery Network (CDN)
- Utilize the Perfmatters plugin
- Optimize WordPress database and disk space
- Lightweight WordPress theme
- Get rid of plugins
- Image compression
- Clean up custom CSS
- Change web fonts
- Only use the icons you need
- WordPress caching
- Tweak Google Analytics
- Speed test results
- Stop obsessing over PageSpeed scores
- Get a web performance audit
- Additional optimization tips and resources
1. Invest in fast WordPress hosting
One of the easiest and most important ways to speed up WordPress is to start with a solid foundation. And that means picking a reliable and fast WordPress host. 👍 Unfortunately, this first step is where a lot of people mess up. Many underestimate just how much of an impact a hosting provider has on your performance.
If you’re on a small website, you’re most likely on a cheap shared web hosting plan. The name of the plan itself really defines what it is. The term “shared” means that your website is hosted on a server along with a lot of other people’s websites. This means they are all fighting over the same resources.
I’m sure you see guys all the time advertising BlueHost hosting. Unfortunately, a lot of those sites are run by affiliate marketers simply trying to make a quick buck. And most of the time, the affiliate marketer doesn’t actually use them, they simply refer people to them.
Picking a host like BlueHost is one of the worst decisions you could ever make when it comes to hosting your website. Did you know that BlueHost is owned by EIG? EIG is a corporation that has been buying up all the crappy hosts. Here is a full list of hosts owned by EIG. You can pretty much expect the same horrible service from all of them.
While it is true that I am an affiliate marketer, my passion for web performance has always trumped that. That is why I will only be referring you to web hosting providers that I currently use for my websites. Having a superior web hosting provider means that you don’t have to worry about downtime or speed. Below are two WordPress hosting providers that I stand behind 100%.
Option 1 – SiteGround
If you are looking for more affordable WordPress hosting, I highly recommend SiteGround. They offer shared hosting with HTTP/2, PHP 7, SSD and tons of other features starting at only $3.95 a month! This is about as good as it gets for shared hosting folks. Make sure to check out our in-depth SiteGround review.
SiteGround is great if you need a cheap host that still has some of the latest features that the bigger guys do. Once you start getting a lot of traffic though I recommend investing in a bigger host like Kinsta.
Option 2 – Kinsta
If you are looking for high performance managed WordPress hosting, I have nothing but praise for Kinsta. Kinsta’s vast feature set is really what sets them apart from the other managed WordPress hosting companies out there.
Kinsta is the kind of host you want if you go on Shark Tank. Some of Kinsta’s current clients include Mint.com, Ubisoft, TripAdvisor, and Intuit! Make sure to check out our in-depth Kinsta review.
Some of Kinsta’s features include Nginx, Ubuntu, PHP 7.4, HTTP/2, CDN, Free SSL, MariaDB, 23+ data center locations, free premium DNS via Amazon Route 53, and uptime monitoring via New Relic. They use software containers which means no resources are shared between sites.
Kinsta also has the best support in the business! Their expert WordPress team is there to help 24/7. All of my sites are hosted with Kinsta.
2. Content Delivery Network (CDN)
No matter how fast your web hosting provider is, you can never beat the latency issue. When you host your website, it is always stored on a single server somewhere in a data center. For visitors across the country, things are much slower because it has to download everything across the globe.
A CDN fixes that by storing copies of your assets, like images, CSS, and JavasScript on servers, also known as POPs, around the globe. It also caches them. This way, when a visitor from across the globe is looking up your website, the content is delivered from the cache of the local POP instead of your web server. Make sure to check out my article on a CDN for dummies if you want to learn more about how CDNs work.
I’ve seen a CDN increase speeds of a WordPress site up to 68%! Here’s the proof.
I use KeyCDN, of course, for all of my websites. At $0.04/GB (lowest price globally) with more POPs than StackPath (currently 33), there really is no comparison, and it’s a no-brainer. KeyCDN also offers origin shield and secure token free of charge, which most other providers charge hundreds of dollars for.
KeyCDN also has a free Let’s Encrypt integration so you can deploy SSL for free. And they fully support HTTP/2, WebP caching, and the latest protocols so that your content is delivered as fast as possible. Make sure to also check out my full review of KeyCDN.
If you aren’t using a CDN yet, then you are hurting yourself. A blog with a decent amount of traffic usually is in the 20-25 GB bandwidth range, and to implement a CDN, it costs less than $5 per month. And suddenly, your site is supercharged from multiple POPs all over the world. I use our Perfmatters plugin to deploy the CDN.
Kinsta is actually partnered up with KeyCDN. So if you use Kinsta as a WordPress host, KeyCDN is included for free! 👏
Can’t afford KeyCDN? Then my next best recommendation would be the free version of Cloudflare.
3. Utilize the Perfmatters plugin
Perfmatters is a lightweight WordPress performance plugin developed by myself and my brother, which basically includes all the optimizations we use on our sites to gain the extra edge over the competition. Get all the secret sauce from our sites with a few clicks.
Some of its features include:
- Disable emojis
- Disable self-pingbacks
- Disable XML-RPC
- Hosting analytics locally
- Lazy load images
- Database optimization
- Disable and or limit WordPress revisions
- Remove query strings from static resources
- Disable embeds
- Disable WooCommerce cart fragments (AJAX)
- Change frequency and or disable Heartbeat API
- Change autosave interval
- DNS prefetch
- CDN rewrite (one-click way to deploy a CDN like KeyCDN)
- Support straight from the developers of the plugin
With the Script Manager feature, you can disable scripts on your WordPress site on a per-page/post and even sitewide basis. This is very powerful and can drastically increase the speed on your WordPress sites (especially your homepage).
A few examples of what this can be used for:
- The popular Contact Form 7 plugin loads itself on every page and post. You can easily disable it everywhere with one click and enable only on your contact page.
- Social media sharing plugins should only be loaded on your posts. You can easily disable it everywhere and load only on post types, or even custom post types.
Even Google says, “A plugin should only enqueue a script if it is actually used on the page.” (source: web.dev)
The Script Manager even supports Regex. This allows you to disable scripts on dynamically generated archive pages, search results, etc. Basically, any script combination you can think of can be disabled or enabled.
4. Optimize WordPress database and disk space
The next thing to do is to ensure that your WordPress database is optimized.
Before proceeding, it’s always good practice to take a backup of your WordPress site. If you’re using a host like Kinsta, you can take a one-click snapshot, and you’re good to go. Otherwise, you can use a free WordPress backup plugin.
If you’ve never done any database optimization before, the first thing you will want to check is that you don’t have any mixed MyISAM and InnoDB tables. Basically, there are two different types of MySQL tables. InnoDB has proven itself to be much faster.
You can follow this tutorial here on how to convert MyISAM to InnoDB. When it comes to ways to speed up WordPress, this is often an overlooked optimization.
By default, WordPress stores revisions of posts and pages when you make changes. This is definitely handy in case you need to revert back to an older version. The bad news is that there is no limit on how many revisions are stored. Especially on large sites, this can quickly bog your database down. How many revisions do you really need?
The first you will want to do is clean up the old revisions and then put a limit in place going forward.
Our Perfmatters plugin provides an easy way to clean up and delete revisions for posts, pages, and custom post types. Or if you are looking for a free solution, the WP-Optimize plugin also works.
As you can see below, in my case, there were 630 revisions sitting in the database. None of these will probably ever be used, so it’s good to clean these up and start with a fresh slate.
Now that the old post revisions are cleaned up, it’s time to limit the number of revisions. This will ensure they don’t start filling up the database again down the line. There are a couple of ways you can do this. I recommend using our Perfmatters plugin. You can limit or disable them with a single click, as seen below.
Or you can do it manually by adding the following code to your wp-config.php file. In this example, I am limiting them to 3.
define('AUTOSAVE_INTERVAL', 300); // seconds define('WP_POST_REVISIONS', 3);
It is important to add the code above the ‘ABSPATH,’ otherwise, it won’t work.
You can also disable revisions altogether.
Old or unused images
Over time you probably have a lot of unused images that take up disk space. This can cause performance issues in various places, even when taking backups of your site.
I recommend using the Media Cleaner plugin. This helps clean up your Media Library from the media entries (and files) which aren’t used on your WordPress site. Make sure to take a backup before running this.
Another thing to watch out for is if you’ve migrated from one image optimization plugin to another in the past. The reason is that some use different file extensions. For example, if you migrated over from Imagify to ShortPixel, you might have leftover images with a
.png.webp extensions sitting in your site’s uploads folder. This can easily account for hundreds if not thousands of extra images.
You can use a script or connect to your site via SFTP and do a quick search for these extensions and then delete them. Make sure to check with your current image optimization solution to confirm which extensions they are using.
Clean up auto-drafts, spam comments, transients, etc.
It’s also important to clean up all the other old data you might have lying around. This includes things like auto-drafts, spam comments, comments in trash, posts and pages in trash, expired transients, etc. All of these things just contribute to a larger WordPress database size.
Again the database optimization features in our Perfmatters plugin provide is an easy and fast solution for this. Just a few clicks and you’re good to go.
5. Lightweight WordPress theme
WordPress themes can make or break your site. There are a ton of bloated themes out there that can bring your site to crawl. When you’re looking for a WordPress theme, you want to make sure you are buying from a reputable company with good developers and support.
I use GeneratePress on all of my WordPress sites; including my blogs (this one) and ecommerce sites. I couldn’t be happier.
I saw a 450ms decrease simply by changing themes, without anything else! Kudos to Tom, the developer of GeneratePress. He keeps things lightweight, and still includes loads of functionality so you can literally build whatever type of site you want.
I also want to mention that you should be careful about buying themes and products on ThemeForest. I’m not saying that all developers at ThemeForest are bad, but unfortunately, a lot of them simply add bloat to increase their sales. Check out my in-depth GeneratePress review along with GenerateBlocks.
6. Get rid of plugins you can live without
The next step was to get rid of all the unnecessary plugins you can technically live without. This is one reason I love using WordPress. There are so many different ways to accomplish things. If you go with another platform such as Shopify or Wix, you’re stuck doing it one way or worse; you don’t have a way to fix it at all.
Here are plugins I got rid of on my own site:
- Scroll to Top Button: Scroll to top buttons are already included in the GeneratePress theme.
- Simple Custom CSS: This is already built into the WordPress Customizer which GeneratePress uses. It’s actually gotten quite good over the years and now does basis syntax color and error correction.
- Standout Color Boxes: I simply do this with CSS and GeneratePress hook now.
- Bloom: This plugin has too many requests, so I switched back to the MTS WP Subscribe Pro plugin.
- TablePress: The block editor in WordPress now has tables, and so does GenerateBlocks.
- Hero Favicon Generator: WordPress 4.3 and above allows you to upload a site icon. You can also easily load your favicon off of a CDN with a GeneratePress hook.
- TweetDis: I switched to Novashare, a social sharing plugin for WordPress, which also includes a tweet shortcode and tweet block.
- Crayon Syntax Highlighter: I switched to the native WordPress code syntax without any plugin.
- Mango Buttons: I simply switched to a CSS button I made, no need for a plugin. The GeneratePress theme also has buttons now.
- Table of Contents Plus: I’m simply hardcoding these now. The block editor now has an easy way to add anchors.
As you can see, there were a lot of plugins I didn’t need. By getting rid of all of these, I significantly reduced the requests on my site and the total page size. I advise you do a plugin inventory and assessment on your site right away!
7. Image compression
Image compression (making image files smaller by removing data) is no longer optional. It’s one of the easiest things you can do! Uploading full-resolution images onto websites, especially those on small shared web hosting plans, can really slow down the load time on your website. You would be surprised how much some images can be compressed without any quality degradation.
I compress all my images using lossy compression with the ShortPixel WordPress plugin. This ensures small page weight sizes and fast loading images that still look beautiful. Every image I add to a page or post is automatically compressed behind the scenes. My recommendation is to always keep your images under at least 100 KB.
I also take advantage of the
.webp image format. This is an image format developed by Google that is much smaller than PNGs or JPGs. I use WebP images on all my sites. The ShortPixel plugin can also do this for you automatically.
How much smaller is the WebP file format? Well, take one of the images on this blog post, for example. The PNG image is 60.6 KB, while the WebP version of the same image is 16.3 KB. That’s a decrease in the size of 73.1%!
It’s also important in the ShortPixel plugin settings to exclude the thumbnail sizes you don’t use your site. This will save you credits and also make for faster image compression. As you can see below, on this site I exclude everything except for: medium, medium_large, and large.
You can also check out the other image compression plugins I recommend.
8. Clean up custom CSS
If you are like me, you might have added custom code in the WordPress customizer to make your WordPress theme work the way you want. or sometimes you are in a hurry and just need a quick fix. Over time, this can add up.
I actually went through my custom CSS the other day and it had 247 lines of code in it. Yikes! After moving to the GeneratePress theme, I went through each line and was able to drop this down to 88 lines of code. 😁 And I could probably clean this up even more.
This just goes to show you how much better the GeneratePress theme is coded. It also means the theme has added more features without sacrificing performance.
9. Change web fonts
I have been doing a lot of research recently on web font performance. I ditched the Adobe Fonts service (previously Typekit). I saw an additional 300ms reduction by doing this. Adobe Fonts adds two external HTTP requests, and it also base64 encodes all the font formats. If you aren’t familiar with fonts, you no longer need to serve all the font formats, you only need WOFF and WOFF2 (if you are going for extra compression).
You have a couple options when it comes to better-performing fonts.
Option 1: System font stack (what I do)
I’ll start with my favorite and the fastest option you have for fonts. It’s moving to what they call a system font stack.
Custom web fonts, such as Google Fonts, make up on average 3.2% of a web page’s overall weight. While this is not a lot, it still contributes to your overall load time. And it could be a lot more than that. Some websites use a lot more fonts than they actually need.
Big-name brands such as GitHub, Bootstrap, Medium, Ghost, and even your WordPress admin dashboard all use what they call a system font stack. This utilizes the fonts on your computer. A few years ago this wouldn’t have looked very good. But with today’s newer operating systems, they all have nicer looking fonts pre-installed.
By using a system font stack there is no need to load any fonts at all on the page! This is pretty huge. It can also help you get rid of any FOUT (flash of unstyled text) or FOIT (flash of invisible text) ugliness. Did you know this site uses a system font stack? You probably didn’t notice, did you? That’s right, this site doesn’t load a single font.
But you still might want to weigh the pros and cons. Do you want something that looks fancy or do you want blazing fast?
If you’re using a theme like GeneratePress, it now has a one-click option to use System Stack fonts. You can also check out my more in-depth tutorial on how to move to a system font stack.
Option 2: Use Google Fonts
Google Fonts are free, very popular, and used by millions of websites around the globe. And this actually helps their performance due to one very specific reason. They are probably already cached on the visitor’s computer. Therefore, if a person hits your site with a common Google Font, it might not have to load again.
The external call to Google is also much faster than using a third party like Typekit. When Typekit goes down, which it does once in a while, it seems like half the internet breaks.
If you’re wanting to use Google Fonts, many themes like GeneratePress already have this option available. Or you can use a WordPress plugin like Fonts Plugin.
Option 3: Host Google Fonts/custom font on your CDN
If you really want to use Google Fonts or have a custom font you prefer, the best method of delivery is hosting them locally on your server or CDN.
The benefit of doing it this way is due to the fact that there is no DNS lookup to a third-party and you have more control over what is actually loading. Check out my tutorial on how to host a custom font on your WordPress site. Or you can use a premium WordPress plugin like Fonts Plugin.
It’s also recommended to prefetch your font files. You can do so by adding the location to your WordPress
header.php file (example below). Or if you’re using our Perfmatters plugin there is an easy option to do this in the settings.
<link rel="dns-prefetch" href="//fonts.googleapis.com/">
10. Only use the icons you need
Font Awesome is great, and millions of sites use it on the web to display the icons you see on a daily basis. However, by default, it loads its entire library of icons for your site.
The best way performance-wise to approach Font Awesome is to package up only the icons you are actually using on your site. Here is a great tutorial on how to host font icons locally (only the ones you need).
Or if you are using a theme like GeneratePress with GenerateBlocks, you can actually paste in the SVG code of any icon you want. This is amazing! As it means there is no need to package up icons. You can easily add only what you need.
11. WordPress caching
Obviously everyone knows by now the importance of caching for your WordPress site. There are free caching plugins out there such W3 Total Cache and WP Super Cache, but I have never been that impressed by them as far as speed goes. They are also a lot more complicated to set up.
I recommend going with WP Rocket (premium) or Cache Enabler (free). Or better yet, if you host your WordPress site with a host like Kinsta, caching is done at the server-level automatically for you! So no need to hassle with a caching plugin. That’s right, I don’t have any caching plugins running on this website. 😎
But if you’re using shared hosting or a VPS like Digital Ocean, you’ll need a caching plugin.
WordPress Cache Enabler
The free WordPress cache enabler plugin is created by the team over at KeyCDN, a global content delivery network that focuses on speeding up content delivery. The plugin was developed with HTTP/2 and simplicity in mind. Setting up a caching plugin shouldn’t have to be crazy complicated or involve 25+ steps.
How does it work? Basically, it creates static HTML files which are then stored on your web server’s disks. When a visitor hits your website, the static HTML file is served. Due to it being static, this can be delivered super fast! Why? Because it pretty much bypasses the plugins, database, etc.
As of writing this, the plugin currently has a rating of 4.6 out of 5 stars. People seem to love it. Here are just a few of the reviews below.
Simplicity and effectiveness. Love it! – atomiccherry
Loving this lightweight plugin! It even supports WebP! Saw a speed increase after installing! – tandkb
Nice and simple caching plugin, works great, and even supports WebP images generated by EWWW Image Optimizer. Awesome! – nosilver4u
Cache Enabler features
The cache enabler plugin features the following:
- Caching HTML to disk
- Feature to automatically purge cache when publishing new pages/posts
- Manual purge feature
- WP CLI cache clearing
- Displays the total size of cache in your WordPress dashboard
- Supports WP multisite and custom post types
- Ability to set the expiry directive
- WebP Support (when combined with Optimus, ShortPixel, or EWWW)
- Supports responsive images via srcset since WP 4.4
- Works with Autoptimize
- HTTP/2 Focused
Example of cache size in dashboard
In your WordPress dashboard, you can clearly see on the “At a Glance” widget the size that is currently in the cache.
Example of Cache Size in Dashboard
You can individually purge pages/posts or clear the entire cache right from the WordPress admin bar.
How to install Cache Enabler
Follow the steps below on how to install the free WordPress Cache Enabler plugin.
In your WordPress dashboard under “Plugins” click on “Add New” and search for cache enabler. Ensure that it says By KeyCDN for the author. Click on the “Install Now” button. You can also download it directly from the WordPress repository.
After you activate the plugin you will want to enable a few settings. In your WordPress dashboard under “Settings” click into “Cache Enabler.” I recommend enabling the pre-compression option and also the WebP support. You can take advantage of this with the Optimus Image Optimizer plugin, ShortPixel, or EWWW.
Step 3 (Optional)
There is an advanced snippet of code you can use to bypass PHP in WordPress. This is an optional step, but you will see even faster speed increases! I am using this for the speed tests you see further below. Follow the tutorial here on how to enable the advanced snippet for Nginx and Apache.
Cache Enabler speed results
So now let’s see what the speed tests say. I am using this on a fresh install of WordPress with the twenty sixteen theme running. If you have a larger site you can expect to see even faster increases!
Without Cache Enabler
I first ran 5 tests via Pingdom and took an average without a caching plugin running.
With Cache Enabler
I then ran another 5 tests via Pingdom and took the average with the free Cache Enabler plugin enabled.
You can see that the Cache Enabler plugin decreased load times from 537 ms down to 390 ms. That is a 27.37% speed increase for only 2 minutes of setup work using a free plugin! Not too shabby.
For a free plugin, the WordPress Cache Enabler plugin can do wonders for your website or blog. It’s super simple to set up and you will see drastic speed increases.
12. Tweak Google Analytics
Having worked in the corporate agency setting in the past I have always enabled advertising features and remarketing in my Google Analytics accounts by default. However, on my blog I don’t use any of the data, so better to remove it. Why? Because if you are running these features you will actually have a 2nd HTTP request for this file:
https://stats.g.doubleclick.net/r/collect? and then your main Google Analytics script will have a 302 redirect in the response header.
You can fix this by turning both remarketing and advertising reporting features off in your Google Analytics account.
You can also disable the features by adding the following code to your Google Analytics script.
ga('set', 'displayFeaturesTask', null);
After disabling this you should no longer have that 2nd HTTP request and your main script will no longer have a 302 redirect.
Hosting Google Analytics locally can also help speed up your site by reducing extra DNS lookups and resolve the “leverage browser caching” issue from their script. It also allows you to load the analytics script from your own CDN which can help you take advantage of a single HTTP/2 connection.
Note: This is not officially supported by Google, but we have been doing this for years without any issues. This can easily be done with our Perfmatters plugin (as seen below).
13. Speed up WordPress test results
And here are my speed test results after I did everything above. The tests were run 5 times and the average taken. The final load time for woorkup is under 500 ms.
Not too shabby. I managed to reduce my HTTP requests from 90 down to 36. I decreased my page size from 939.9 KB down to 291.5 KB. And I decreased my load time from 1.52s down to 495ms! 😮
Feel free to click around this site and see how fast it loads. The proof is in the pudding.
14. Stop obsessing over PageSpeed scores
This is one of my biggest pet peeves when it comes to speeding up WordPress sites. I’ve optimized and observed thousands of sites over the years, from small blogs to custom-built WordPress sites that get millions of visitors per month. And guess what? I rarely ever use Google’s PageSpeed tool. And I can tell you the developers of most of these big sites don’t either.
I realize this might be contrary to what other people have told you, or that you’ve read around the web. But before you have a panic attack, let me explain a bit. And this goes for all scores and letter grades that various other tools like GTmetrix uses.
Total load time is what you want to focus on, not scores. The scores are meant to be used as a guide and will not always correlate with total load times. So chasing a perfect or higher score in a lot of cases can be a waste of time. And in some scenarios, it can actually have the opposite effect and degrade your site’s performance.
Now there is definitely going to be some correlation between the two. As you get a higher score, you will hopefully achieve faster total load times. This is why Google built its tool in the first place, as a guide to get you there. And it definitely can help. However, this is not always the case if you are simply piecing together tricks and plugins designed solely to fix these scores.
Take Google’s own development site for example. It scores a 55 on mobile in their PageSpeed Insights tool. If you are basing everything off of only the score, this is not great. What it actually means is even they aren’t trying to chase down that perfect score.
In fact, if you are only looking at scores, this can sometimes destroy your site’s perceived performance. Perceived performance is how fast your site feels to a person visiting it. If your site’s perceived performance is bad, this can have a direct impact on your bounce rate and time on site. And these are factors Google does use.
One good example of this is when lazy loading images. You’ve probably seen this happen before. The viewport isn’t set correctly, and as you scroll down the page, the images don’t load until you are already reading the content where the image is supposed to show up. This is downright annoying to users and will make them not want to return to your site. Does it shave off a couple of KBs from the first time load? Sure, but you need to be careful.
The correct way to lazy load images is loading them immediately once they enter the browser’s viewport. This will also ensure you don’t see what I call a “lazy load flash.” And this is how we do it in our Perfmatters plugin. Things like this are so important, and we pay attention to all of these little details when we are developing our plugin.
To recap, all Google wants from your site is for it to be fast and load in an optimal way. This is all you should be focusing on. And yes, total load times are important on mobile, as that is what Google is now using for its indexing in SERPs. In other words, Google is looking at the total load time of your site on mobile devices, not just desktops.
With all that being said, I understand this can be difficult sometimes, as you might be building a site for a client, and all they want is a faster score. They don’t understand or care about what should actually be optimized or how on the site. Trust me; I feel your pain and I’ve been there. 😉
If you are dealing with a frustrating client, my best recommendation is to forward them the info above. You might be surprised by their response. And if they stick to their guns, well you might be optimizing for a while.
If you are curious about what I use when performance troubleshooting, I tend to use a mix of Chrome DevTools, Pingdom, and GTmetrix for different data points. WebPageTest can be a good free tool to use if you are wanting to measure mobile load times.
Regardless of what speed testing tool you use, it’s important to pick one and stick with it. Even Google recommends this. Each tool measures speed in a different way and you need an accurate baseline to monitor performance improvements.
15. Get a web performance audit
Still need an extra boost? If you still aren’t satisfied with your speed, I always recommend hiring an expert and getting an audit done on your site.
One day I’ll probably offer web performance audits, but right now I simply don’t have time. For now, I highly recommend Mike Andreasen, a Codeable expert, for web performance audits and HTTPS conversions. Here is an example of a client’s site before and after Mike’s web performance optimizations.
I personally chat with Mike on a regular basis. He is one of the only web performance guys out there which I agree with on just about everything when it comes to optimization, which services and tools work the best, etc. 😉 And trust me, that is rare.
He has completed over 1,300 projects for clients. I personally vouch for his work as I have the graphs, speed tests, and data from actual clients to back it up!
16. Additional optimization tips and resources
Here are a few additional things I recommend:
- Load your Gravatars from your CDN and lazy load them.
- Use our Perfmatters plugin to help fix admin-ajax.php slowness with Heartbeat.
- Stop using sliders. These are almost always horrible when it comes to performance. They can also negatively impact your conversions.
Below are also a few newsletters I highly recommend taking the time to subscribe to as they provide incredible insights into the web performance and development industries.
Web Development Reading List (WDRL)
kinsta.com: A weekly newsletters with WordPress tips and strategies to drive more traffic and revenue to your business! Being that Kinsta is a high-performance hosting company, many of the articles are focused around performance.
keycdn.com: Webperf, webdev, WordPress, content delivery, once a week.
Smashing Magazine newsletter
smashingmagazine.com: Smashing Magazine is an online magazine for professional web designers and developers. Useful tips and valuable resources, sent out every second Tuesday.
Call me crazy but I am actually still not happy with the results. I’m pretty OCD when it comes to performance so I will always be optimizing. It’s a job that never ends. Make sure to bookmark this post as I am constantly updating it. Hopefully, my experience above on how to speed up WordPress will be eye-opening for you.
I would love to hear any feedback below!