Imagine that you are having a big meeting and your team has been rehearsing for all month. After all these preparations, a teammate assigned to bring the laptop you need for the presentation is running behind. And, the teammate shows up ten minutes later than the scheduled, and your prospective client is tired to wait.
Well, that sounds too deleterious and won’t go well with the client. Now, you can imagine how your visitors feel when they need to sit around and wait for your website to load in their browser. What do you suppose they will do if some web page takes over ten seconds to load? Or even six? Four?
It’s no big secret that the speed of a site matters. Nobody wants a website with slow-load – especially Google. So, unless you want to build a poor user experience and lower your chances of ranking in Google, it’s about time you do something to WordPress Speed Optimization.
With almost 40.0% of the web powered by WordPress, there are a hundred thousand plugins, themes, and other technologies that have to coexist to optimize WordPress for speed. An everyday WordPress user might find this a nightmare when their website is set up to bottleneck, and they even don’t know why.
Here, we will share absolutely everything there is to know regarding WordPress speed optimization so that you can begin speeding up your website today. Hopefully, we can guide WordPress performance optimization without getting too technical or “code-based.” As a matter of fact, we make efforts to avoid code examples here.
So, are you ready? Let’s begin.
- i) What slows down your WordPress Website?
- ii) Backup, Staging & Testing
- 1. Choose a high-performance web hosting provider
- 2. Use caching
- 3. Choose your plugins and themes wisely
- 4. Use PHP 7 and Above
- 5. Use SSL/HTTPS
- 6. Image optimization
- 7. Gravatar optimization
- 8. Lazy loading for videos and images
- 9. Lazy-load Disqus
- 10. Limit post revisions
- 11. Limit spiders and crawlers
- 13. Bonus
- iii) Different Problems, Different Solutions
i) What slows down your WordPress Website?
First and foremost, let’s look at some significant culprits that tend to make your website slow. These are the sections where you should center your focus.
The outlandish image size kills the website speed.
WordPress features like video backgrounds are cool, but they are also an actual performance drag to a site speed.
c. WordPress Plugins
WordPress plugins are definitely huge lifesavers, but “which one” and “how many” will make a difference.
d. WordPress Themes
The same rule applies to the themes. A good WordPress web design is a must-have. However, a poorly coded theme has too many files and scripts to cause you trouble.
APIs definitely help in content management. But if the servers your website is connected are slow, to begin with, the site response will be slow.
Sloppiness can happen in your media folder, plugins, your blog content, or your database.
h. Broken Links
One or two broken links isn’t terrible. But a site full of broken links can take a toll on the user experience and lower the speed as your server continues to work on that broken connection.
Again, redirection prevent visitors from encountering the broken links/ old URLs, but having too many of them is a load of work for the server.
Before we get started…
ii) Backup, Staging & Testing
The best strategy to back up the WordPress website is to create a new subdomain (such as testing.domain.com) and do all of your optimization work on it. Most of the hosting service providers like WPEngine, Siteground, Kinsta and other popular companies provide one-click staging. If your hosting company does not provide you staging site creation, you can use the free or premium backup plugins to get the backup. When you are satisfied with the results on your staging site, you can incorporate your fundamental changes into your live website. Now, your site is optimized for speed with no issues.
Another technique you can adopt is building a child theme. The use of a child theme ensures that the changes made in your theme files are not overwritten on your parent theme.
Finally, test your present speed with the use of these WordPress Speed test sites.
Now, let us begin steps for WordPress performance optimization.
1. Choose a high-performance web hosting provider
Let’s begin with a hosting company that has the following characteristics:
- One that specializes in WordPress hosting- they do understand the inherent CMS associated performance problems
- Offers some managed hosting options
- Uses the latest and fastest technologies
- Includes caching and a CDN
- And great Customer Support wouldn’t hurt
But how can we choose the best one?
The easiest way to measure the hosting quality to check the TTFB. Time to the first byte denotes the server’s time to respond, which basically represents how fast the server is. You can use ByteCheck for free TTFB testing. WPengine, Kinsta, SiteGround, Bluehost, HostGator, etc., are some website hosting providers that can be trusted.
2. Use caching
Website caching is the technique where a static HTML version of your web page is stored and later reused when the visitors come to a website. That way, the browser would already have the needed information regarding the site, making WordPress speed better.
Especially for the static site that doesn’t update frequently, the use of caching plugin would be of utmost benefit. WP Rocket, Cache Enabler, WP Super Cache, W3 Total Cache, etc., are the best ones in the market.
These plugins lower the load time on your server and handle other speed optimization tasks such as:
- The browser and Page-level caching
- Gzip file compression
- CDN integration
If your hosting provider already comes with a caching system, adding an extra plugin will be unnecessary.
3. Choose your plugins and themes wisely
Are you aware of the strain that a theme and a plugin can put on their server? That’s why you need to be picky about the use of WordPress themes and plugins.
a. Right WordPress Theme
A poorly coded, and un-updated theme adds useless scripts to pages, which lends to a poor page loading experience. So, set your pick for quality control issues before installing it on your site. Sadly, most of the free WordPress themes in the market look good in design and are full of more features but ignore performance.
Our good theme comes with a set of dedicated performance features and eliminates the need for additional third-party plugins.
b. Only use the most needed plugin
When choosing WordPress plugins, keep the following tips in mind:
- Knowing if the plugin is necessary or some WordPress features/ simple coding is available as a supplement to the plugin.
- Review each plugin along with the noted issues in performance–never install something that has a questionable history.
- Look for plugins with multiple features and functionalities so that you can use only one instead of so many
- Updating the themes and plugins is a must to keep your site secure and fast. But at the same time, some of the updates might make the themes/ plugins and WordPress incompatible. So only install if the update is a useful one.
c. Rethinking your plugin use
Yes, using too many WordPress plugins will somehow slow down your website. But the number of plugins is not as vital as the quality of the plugins you use. What actually matters is how that particular plugin was developed – was it built with performance in mind? Meaning, you might also want to look at some of your old plugins and replace them with the new and light ones.
4. Use PHP 7 and Above
Have you ever heard of PHP versions? You must have. PHP is an open-source, server-side scripting language. Most of your themes and plugins, along with the core WordPress software, are fundamentally written in PHP.
First, ensure that your WordPress host is using at least PHP 7 or higher. As per the data, only 6.8% of total WordPress sites use PHP 7.3, but another whopping 28.6% still use PHP 5.6 (released in 2014).
What if someone gave you a phone that was released back in 2014? It would have a slow and sluggish response to drive you insane.
That’s precisely how your visitors will feel with PHP 5.6.
5. Use SSL/HTTPS
SSL certificate does not directly strike on the WordPress speed, but it is still highly recommended that you get one. Firstly, and importantly, Google confirms that proper use of HTTPS/SSL gets you the better ranks.
Moreover, as SSL-certified websites are presented with a small green padlock sign located over the address bar, they increase the customers’ confidence.
The other reason is security. Having an SSL certificate on your site will encrypt the data/ information transfer to and from your website, making your site more secure.
6. Image optimization
Having images on your site is always a good thing. But the wrong kind can be the biggest disaster to your website. A quick way to speed up your website is to optimize the images.
Do you know how image optimization can make your site faster? It can reduce your website’s bandwidth usage, open quickly to keep the users engaged, and don’t give google search engines one more reason to hate your website.
There are different ways to optimize an image. We will learn all about them here.
a. Choosing the right image format
The most used image formats for this decade are JPG, PNG, SVG, and GIF. The GIF is mainly for the animated images and the JPG and PNG for the still image. Among these two, JPG (or JPEG) format is ideal for displaying multi-color images. The SVG format is used explicitly for the logos. PNGs are only used in cases where SVG is impossible, and the transparency of an image must be preserved, so a JPG also goes out of the option.
But with so many editing apps on the internet, you should not be confused about which image format to pick. One such tool is XnConvert. You can just drag and drop your image here and save it in the smallest size format. You can also use XnConvert to resize, crop, change image formats, and many more in bulks of a hundred.
b. Use image compression
Now you have saved the file in either JPG and PNG format; it’s time to compress the file.
When you first take an image, it is considered at 100% quality. You can lower the image quality (compress) it to a smaller size. You can compress the JPG image file to 85-90% without any changes.
You can either convert the images manually before uploading them or just use a plugin. There are plenty of plugins known to compress images in WordPress. ShortPixel Image Optimizer, reSmush.it, EWWW image optimizer, and WP compressor are some beneficial ones.
But, incorrect image optimization also hurts the performance of your site performance. Some of the best image optimization technique is Server-based image optimization and optimizing images locally before uploading them.
As an alternative, one can use the LiteSpeed plugin that is basically a caching plugin that also allows image compression using Google Pagespeed addon. As LiteSpeed compresses all the images on their server, your server’s response time will not affect the operation. But you need to compress them in batches.
c. Specify image dimensions
Specifying image dimensions are mainly related to the user experience. Let’s learn how.
When the page loads the text first, the image size is also determined as the page layout is set. But after the images are downloaded simultaneously, the browser then finds different image dimensions and automatically adjusts the layout of the page. Basically, for every subsequent image loading after some time, the browser needs to re-create the page layout. With such changes, the visitor cannot read the text when the page keeps on shifting.
Specifying the image dimensions beforehand saves you from this hassle.
d. Serve scaled images
This has to be done if your theme is not optimized to handle images. Ideally, you can just change a theme you are using to the one with image optimization. Or you can also use plugins like Force Regenerate Thumbnails or Regenerate Thumbnails to build your thumbnails. Just set the correct sizes for the thumbnails before you use such plugins.
7. Gravatar optimization
Global avatar lets you, as well as your website commenters, get pictures on their profile. Without a doubt, using a Gravatar has enormous advantages, but the most significant disadvantage is brought by the slow loading time. To top it off, the Gravatar also incorporates multiple redirects to slow your site even further.
You can avoid the bloat introduced by the Gravatar by following ways:
- Disable Gravatar on your websites
- Delete excessive and spam comments from posts
- Add reCAPTCHA on your comment form
- Configure WordPress setting to display only a few comments at a time
- And lastly, use the caching plugin for Gravatar
8. Lazy loading for videos and images
Lazy-Loading images is an effective and easy optimization option to improve your website’s loading times significantly. Without lazy loading, all media files like images and video are loaded even before they have scrolled down to that section. This obviously makes your website slower, especially when you have many images/ videos on your websites. Lazy loading loads images and other heavy assets only after the visitor scrolls to the section on a webpage where they appear. When done right, Lazy Load can considerably boost website speed.
Let’s learn how to use Lazy Load
- First, get the lazy load plugin from WordPress Directory and install it
- Go to the settings of the plugin and configure it
Remember that lazy-loading comes with a complex technique. If not configured right, it can mess up your entire website.
9. Lazy-load Disqus
Maybe it’s time to replace the classic WordPress comment system with a Disqus. While its advanced, highly effective spam prevention and moderation functionality are worth a lot of praise, it comes with a cost, i.e., load time.
Whenever a Disqus loads on your site, it causes ten additional requests to slow your site. Thankfully, there’s plugin such as Disqus Conditional Load that causes the lazy loading the Disqus itself. This Disqus Conditional Load loads the comment only when the visitor scrolls to the end of the page.
10. Limit post revisions
By default, WordPress is designed to save all the post revisions, even when you make the slightest change. So, for the frequently edited/updated post, tens of copies of the precisely same post are made to fill your database.
To avoid this, you can limit the number of revisions/ updates saved in WordPress. Usually, 3 to 5 should be sufficient. You can do so by placing a simple code in the wp-config.php file.
define ('WP_POST_REVISIONS', 3);
You can modify the number in the code to adjust the number of revisions you might need.
But this code will only work for the new post. To remove the older posts’ revisions, you can use database cleanup plugins such as WP-Optimize and Advanced Database Cleaner. After using the plugins, you can simply delete the plugin.
11. Limit spiders and crawlers
Spiders and web crawlers are always looking for the resource on your site. Apart from helpful search engine spiders, other bots like spambots, scrapers, email scrapers frequently crawl your website. They not only steal the information from your site, but the server needs to expend resources to serve them.
So, it’s wise to manage the botting activities on your website to check for such useless crawling by following ways.
- You can use the .htaccess file to block the known bad bots.
- You can block the bots from your website when such bots are seen newly in the market.
- One can use the security plugin WordFence to throttle the bots and block IP addresses manually.
And if you are not satisfied with the result yet, you can follow some more tricks. These tricks are primarily for professional coders. Let’s list them out.
- Disable Emojis and Embeds
- Remove Query Strings
- Remove the Shortlink Tag
- Remove REST API Links
- Disable Google Maps
- Disable WooCommerce Style Sheets/ Widgets
- Avoid Google Fonts/ Server Fonts Locally
- Optimize Font Awesome Icons
- Disable XML-RPC
- Hide WordPress version
- Remove RSD Link Tag
iii) Different Problems, Different Solutions
Having known the avail of website speed optimization and its technique is a good start. But you do not need to apply all these techniques to your website. What we mean is, since there are no two businesses alike or no two sites alike, the first step is to comprehend the nature/ type of WordPress site you own.
So, if you have a static site, you will not update your site’s content regularly; perhaps you only make a minor couple of times a month. Static site includes local business websites, blogs, photography, individual, etc. Having such a site indicates fewer databases, and thus you will not need numerous resources to achieve good performance.
On the other hand, having an extremely vibrant website such as eCommerce, online forums, etc, the WordPress site’s data is frequently changing (every min or even every second). In such a case, there is a need for added server sources as well as database queries.
And then there are other kinds of websites, On a passing-through and the consuming one. If the website is primarily informational, the visitor can stay for 5 or 10 mins and locate when they need to leave. On other hand, the consuming websites keep their visitors for hours- for example, an online training course website. The simultaneous visitors to such websites come for the simultaneous sessions.
Can you see where this is going? The simultaneous visitors need to accumulate the information of the previous session quickly. Having a lot of simultaneous site visitors along with the “uncacheable web content” issue makes it a nightmare.
Basically, you cannot deal with all of your WordPress websites the same way- a well-informed decision should be made.
Without a doubt, there is more than an abundance of tutorials that cover different ways to optimize WordPress for speed. But it can be confusing to find everything in one place. Hope this one was helpful to you as we have listed all the technique you can follow to make your site load quickly.