The 2022 WordPress Website Optimization Guide
BLOG

The 2022 WordPress Website Optimization Guide

Table of Contents

Every WordPress website owner is obsessed with website performance, especially page load time. 

In 2022, when Google shows hundreds of websites for any user query, ensuring that your website loads instantly and continues to work without any problem is essential for ensuring your website attracts visitors and contributes to your business goals.

Website speed and performance are so important that Google considers them an essential ranking factor when building its search index. Generally, search engines rank fast-loading websites much higher than slow-loading websites with glitches.

Slow-loading pages signal that your website will not offer a great experience. Crazy Egg has a great blog post explaining why visitors leave websites.

If you have a WordPress website, this article will cover several essential tips for optimizing your website. Once you apply them, you can offer your website a much better user experience. 

Factors That Slow Down Your Website

Let’s start with the factors that slow down your website. Understanding these factors can help you make long-term decisions about website performance and how you would optimize your website for an excellent user experience.

Your Web Server

All your website files are hosted on your web server. An improperly configured server can slow down even the best-optimized WordPress websites. That’s why you need to pay close attention to your server settings and  

WordPress Cache(s)

The most frequently served pages should be cached to reduce the load on the server. The server must dedicate resources to respond to every request without cache. This quickly overwhelms the server, causing it to slow down and eventually crash.

The Page Size

The page size is the sum of all the files the browser requires to render a page. This includes images and videos that are part of the page. If these assets are not optimized, the download package will be too large, slowing the user experience.

External Scripts

External scripts are hosted on third-party servers. When they are included in your website, your server sends data to these scripts and then waits for a response. This adds to the time required to load the page in the user’s browser. The worst happens when the call fails, and the user has to wait for several seconds before the browser finishes displaying the page. 

WordPress websites are often slow because of a combination of these factors. So, let’s explore the tactics you can apply to optimize WordPress websites and speed up the user experience. 

But First, Check Your Website Speed

When optimizing a WordPress website, it is essential to determine why the website is underperforming.

It will help if you start by doing a website speed test. A simple Google search will lead you to several popular online tools. For this article, we’ll go with isitwp free website speed check

The results contain a lot of helpful information that could help you understand why your website isn’t performing at its best. The most important set of data is in the first fold. Here, you can see the Load Time, Page Size, and the number of requests sent to get the elements on the website. 

Google says a good website load time is under two seconds, with half a second ideal.

The Top Ten Tactics For Speeding Up Your WordPress Website

Here are ten ways to optimize your WordPress website and offer a great experience to visitors. The good thing about these tactics is that you don’t have to mess around with the code to implement these ideas. 

Keep Everything Updated

The easiest way of optimizing your WordPress website is to update the plugins and themes installed on your website. 

Every new version of themes and plugins is better optimized for performance and speed. In addition, new versions are free of known bugs and more compatible with the popular WordPress themes and plugins. 

WordPress now offers an Updates tab in the left Admin Menu bar. This tab provides all the information you need about the latest available version. Click the Update button to start the update process. 

Check For Background Activity

WordPress has a whole system of scheduled tasks that run in the background. These tasks take care of site management and updates so that you can focus on more important activities. 

Some of these tasks have little impact on the site’s performance. An excellent example of these tasks is the publication of the scheduled posts. Similarly, the process that checks for the availability of the latest WordPress version also doesn’t slow down the website. 

On the other hand, some scheduled tasks, such as site backup, can slow down the website because they consume server resources. 

While you cannot stop these processes entirely because of the adverse impact on the site performance, you can undoubtedly control when they become active. For instance, you can schedule the backup plugin to take the backup when your site has low traffic. Similarly, you can adjust the process frequency to space out the site back up so that it doesn’t affect site performance too much.

Display Post Summaries Rather Than the Full Articles

WordPress displays the full articles on your homepage and archives page. Now, if your website has a lot of content, the page load speed would decrease because of all that content. 

In addition to slow page load speed, this could decrease the pageview count because the visitors could see everything on the homepage and thus won’t be compelled to click to other pages and posts on your site. 

You can remedy this by showing summaries on these pages. To do so, simply go to Admin Menu >> Settings >> Reading. Scroll down to the “for each article in the feed, show” radio button and select Summary. 

Don’t Upload Audio/Video to Your Server

Audio and video are great for capturing visitors’ attention. Many WordPress users make the mistake of uploading them to the Media Library. 

These assets increase the overall time required to display the page in visitors’ browsers, which also consumes your bandwidth quota.

But that’s not all – you also need to understand that the backup plugin on your website usually includes everything in the Media Library in the archive. 

As a result, considerable files in the Media Library increase the time required to back up your website. Another downside is the time necessary to restore your website. Since the huge archive size, the plugin needs time to unpack everything, ensure everything checks out, and then start copying everything to the designated folder. 

Instead of uploading everything to the server, you can host the videos on YouTube, SoundCloud, and Vimeo platforms. You can then use the embed code provided by these platforms to embed the video in your posts and pages. You could embed as many videos and audio on your website without worrying about performance drops and bandwidth caps.

Limit the Number of Post Revisions

By default, WordPress saves all the revisions of every post and page on your website’s database. All this bloat affects the performance of the plugins that query the database. Some plugins exclude post revisions to minimize the performance penalty. 

Since most of the theme and plugin functionality involves database queries, the database must be as lean as possible for improved website performance. 

Fortunately, the process is straightforward. 

First, find the wp-config.php file (usually located in the root folder of your WordPress website). Once you have located the file, download it to your local computer.  

Necessary: Make a copy of the file so that you can restore it in case anything goes wrong.

Open the downloaded file in your preferred code editor. Add the following line and save it:

define( ‘WP_POST_REVISIONS’, 4 );

This snippet limits the number of saved post revisions to four. WordPress will now hold the last four revisions and discard the older versions.

This simple trick reduces the size of the database and speeds up the performance of the plugins and themes. 

Install a Cache Plugin

Most WordPress posts and page content are dynamic, meaning the server “builds” the content in response to the visitor’s request. The server has to run an internal (or external) script or process to pull all the required information and send it to the browser. 

You can imagine your server’s time to fulfill all the user requests. 

A cache plugin is a great solution that reduces this requirement by half. Once the plugin is installed and active, it stores a copy of the most requested pages. When a user requests a page in the cache, the plugin instantly serves it instead of burdening the server. 

Many hosting providers recommend a cache plugin, and there are many great ones on the market. If you want to try a plugin, start with WP Rocket and WP Super Cache. 

Optimize the Images

Images are essential for breaking the long walls of text and spicing up the presentation of your posts and pages. 

Do you know that adding unoptimized images could slow down your website? In fact, for many websites, this is often the number one reason behind the slow loading of pages. 

Now, you can optimize the images yourself by reducing their size through image editing software or saving them as JPEGs. 

You can also install image optimization plugins such as Smush or EWWW to optimize the images you upload to your website.

Optimize the WordPress Database

Over time, the WordPress database accumulates data that increases the size and time required to search the database. 

Removing all outdated information (particularly old revisions and unused tags) from the database is an excellent way of optimizing your WordPress website. A good way of doing this is through plugins such as WP-Sweep. These plugins remove old information and optimize the database structure. 

Use Lazy Loading

If you use many audio/video, images, or galleries on your website, lazy loading is a great way to decrease page load time. 

When available, lazy loading replaces the assets with a placeholder for faster page load. When visitors scroll to a portion of the page where a placeholder is located, it gets replaced with the original item. This technique works for gravatar and comments as well. 

To implement lazy loading on your website, you can use a lazy load plugin such as Lazy Load by WP Rocket.

Kill Content Hotlinking 

Hotlinking is the practice of other websites linking to your content using a direct web link. Every time someone visits their page, the content from your website is loaded from your server, wasting your bandwidth and server resources.

To prevent hotlinking, you can add the following snippet to the .htaccess file, which is located in your website’s root folder.

#disable hotlinking of images with forbidden or custom image option

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yourwebsite.com [NC]

RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?google.com [NC]

RewriteRule .(jpg|jpeg|png|gif)$ – [NC,F,L] 

Conclusion

Optimizing your WordPress website is an ongoing activity. You need to pay close attention to keep things updated, and you also need to check the website’s performance regularly (we recommend twice a month) to ensure everything works fine. 

We hope you apply these tactics to your WordPress website and offer a great experience to your visitors. If we missed your favorite WordPress optimization tactic, let us know in the comments below. 

Author Bio

Zafar Iqbal is a marketer turned WordPress enthusiast. He is interested in all things WordPress and Frontend. He runs zfrqbl, a helpful resource for WordPress users. When not playing with a test website, he’s playing an FPS!

wp tech support

Leave a Reply

Comment policy: We value comments and the time that visitors to our blog spend to give feedback. Please note that all comments are manually moderated and any deemed to be spam or promotional will be deleted.