Training to improve the speed and performance of the WordPress site
In this article from the KeyUpSeo blog, we have provided a complete tutorial on increasing the speed and performance of a WordPress site.
A decrease in the speed of the site will lower the performance level, and you should be able to improve the speed and performance of the WordPress site.
The audience is as interested and loyal to you as they can be, as strict as they are, and they leave you when they see your speed and poor performance.
Do you also want to increase the speed of your WordPress site?
Pages that load well and at high speed improve the user experience. It increases the user and traffic of the site and helps SEO.
In the following, we will teach you the most useful tips to increase the speed and performance of WordPress.
Why is speed an important issue for a WordPress site?
First, let's take a look at why WordPress speed is important, what causes WordPress to be slow, and what practical steps you can take to improve WordPress speed.
You need very little time to show your content to users and convince them to stay on your website.
Page loading speed is important for internet users, and if it takes too much time, they will leave your site.
According to studies, a one-second delay in loading time can lead to a 7% decrease in conversion rate, 11% fewer page views, and a 16% decrease in customer satisfaction.
In addition, Google and other search engines have already started penalizing slower websites with lower rankings and positions in search results, which means less traffic for slower websites. In short, if you want to get more traffic, subscribers, and revenue from your website, you should seriously consider increasing the speed and performance of WordPress.
In general, here is a comprehensive guide to optimizing WordPress performance so that you can grow your site's SEO power.
How to check the speed of your website?
Most beginners think that their website is fine just because it is not slow on their laptops and computers. Because you visit your website often, modern browsers like Chrome cache your website and automatically retrieve it as soon as you start typing. This will make your website load almost instantly.
However, a normal user visiting the website for the first time may not have the same experience. Users in different geographical locations have a completely different experience.
Using SEO tools, you can check the speed of your website, and the lower the loading speed, the better.
After you have done your website speed test, you may ask yourself what speed is suitable for our website.
The standard loading time of the site is under 2 seconds! However, the sooner, the better.
What slows down a website?
The speed test report is likely to have several recommendations for increasing WordPress speed and performance. However, most of them are technical terms that are a bit difficult for beginners to understand. Learning what slows down your website is key to improving performance and making smart long-term decisions. The main reasons for the slowness of the WordPress website are:
• Web hosting
When your web hosting server is not configured properly, it can hurt website speed.
• WordPress configuration
If your WordPress site does not provide cached pages, it will overload the server and cause the website to slow down or fail.
• Screen size
Mostly images that are not optimized for the web.
• Malicious plugins
If you use a poorly coded plugin, it can significantly slow down your website.
• External scripts
External scripts such as ads, font loaders, etc. can also have a huge impact on your website's performance.
Now that you know what slows down a WordPress website, let's take a look at how to increase WordPress speed and performance.
The importance of choosing the right host for WordPress
WordPress hosting service plays an important role in website performance. A good shared hosting provider takes extra steps to optimize the website. However, in shared hosting, your server resources are shared with many other customers. This means that if your neighbor's site has a lot of traffic, it can affect the performance of the entire server, which in turn slows down your website.
On the other hand, using a managed WordPress hosting service provides you with the most optimal server settings for running WordPress. Managed WordPress hosting companies also offer automatic backups, automatic WordPress updates, and more advanced security settings to protect your website.
Using the WordPress cache plugin
WordPress pages are "dynamic". This means that every time someone visits a post or page on your website, it will be loaded at the same time. To build pages, WordPress has to go through a process to find the information it needs, put it all together, and then display it to the user.
This process involves a lot of steps, and it can slow down your site when multiple people are visiting your website at the same time. This is why we recommend that every WordPress site use a WordPress caching plugin. Caching can speed up your site from 2x to 5x faster.
When a user visits your WordPress site, your server retrieves information from your MySQL database and PHP files. It then puts it together into HTML content that is served to the user. It's a long process, but you can greatly improve speed when you use cache instead.
Use an optimized theme with good speed
When choosing a template or theme for your website, it is important to pay special attention to speed optimization. Some beautiful and impressive themes are poorly coded and can slow down your site. It's usually better to go with a simpler theme than to choose one that has complicated layouts, flashy animations, and other unnecessary features. You can always add those features using quality WordPress plugins. The chosen WordPress theme should above all be standard and have excellent accessibility levels.
Image optimization
Images bring your content to life and help increase engagement. Researchers have found that using color images makes people read 80% more of your content. However, if your images are not optimized, they may do more harm than good. Unoptimized images are one of the most common speed problems we see on beginner websites.
Before you upload a photo directly from your phone or camera, we recommend using photo editing software to optimize your images for the web. These photos in their original formats can have large file sizes. But depending on the image file format and compression you choose in your editing software, you can reduce the size of your image up to 5 times.
PNG image format is not compressed. When you compress an image, it loses some information, so an uncompressed image will be of higher quality with more detail. The downside is that the file size is larger, so it takes longer to load. JPEG, on the other hand, is a compressed file format that slightly reduces image quality, but is significantly smaller.
In the article The best plugins to reduce the size of images, we introduced several paid and free plugins to reduce the size of WordPress site images.
So how do we decide which image format to choose?
- If our image has different colors, we use JPEG.
- If the image is simpler, or we need a transparent image, we use PNG.
Keeping WordPress updated
As a well-maintained open-source site-building platform, WordPress is frequently updated. Each update not only brings new features but also fixes security issues and bugs. WordPress themes and plugins may also receive regular updates.
As a website owner, it is your responsibility to keep your WordPress site, theme, and plugins up to date. Failure to do so may make your site slow and unreliable, leaving you vulnerable to security threats. So, if you want to increase the speed and performance of WordPress, be sure to update it in your program.
Use the latest version of PHP
WordPress is primarily written in the PHP programming language. It is a server-side language, meaning it is installed and run on your host server. All WordPress hosting companies use the most stable version of PHP on their servers. However, your hosting company may be running a slightly older version of PHP.
Always, the latest version of PHP is faster than its previous versions, and it is better to be updated to increase performance.
Optimization of behind-the-scenes processes
Background processes on WordPress are scheduled tasks that run in the background of a WordPress site. Below are some examples of background tasks running on a WordPress site:
- WordPress backup plugin tasks
- WordPress cron jobs to publish scheduled posts
- WordPress cron jobs to check for updates
- Search engines and other crawlers that try to fetch content
Tasks like cron jobs for posts and scheduled updates have less impact on website performance. However, other background processes such as backup plugins and excessive crawling by search engines can slow down a website.
For backup plugins, you need to make sure that your plugin backs up your website during low-traffic times. You should also set the backup frequency and the data to be backed up.
For example, if a full backup is taken daily while you only publish new content twice a week, you should adjust it to your activity and not need daily backups.
Using the summary on the main page and archive
By default, WordPress displays the full content of each article on your homepage and archives. This means your homepage, categories, tags, and other archive pages will load more slowly. Another disadvantage of displaying full articles on these pages is that users do not need to visit the actual article. This can reduce your page views and the time users spend on your site.
To speed up the loading time of the archive pages, you can set your site to display excerpts on the home page or blog instead of the full content.
Split long posts into more pages
Users tend to read longer and more in-depth blog posts. Longer posts rank even higher in search engines. But if you're publishing long articles with lots of images, it might hurt your load time. Instead, consider splitting your longer posts into multiple pages.
WordPress has built-in functionality to do this. Simply add the <!––nextpage––> tag in your article where you want to split it to the next page. If you want to split the article to the next page, do it again.
Division of comment pages
Getting a lot of comments on your posts? It's great! This is a great indicator of an engaged audience. But the downside is that loading all these comments can slow down your site. There is a simple solution to this problem!
Simply go to the settings, then the conversation section, and apply settings for a lighter and better display of comments.
Using a Content Delivery Network (CDN)
We mentioned above that users in different geographic locations may experience different loading times on your site. This is because the location of your web hosting servers can affect site speed. For example, let's say your web hosting company has its servers in the United States. Visitors who are also in the US will typically see faster loading times than visitors in Germany.
Using a content delivery network (CDN) can help speed up load times for all of your visitors and increase the speed and performance of WordPress.
A CDN is a network made up of servers around the world, and each server stores "static" files used to create a website.
These static files include unchanging files such as images, CSS, and JavaScript, unlike WordPress pages, which are "dynamic." When you use a CDN, every time a user visits your website, the static files are served to them from whatever server is closest to them. Your web hosting server will also be faster because the CDN does a lot of the work.
Do not upload audio/video files directly to WordPress
You can upload audio and video files directly to your WordPress site and automatically display them in an HTML5 player. But you should never do that!
Audio and video hosting will cost you bandwidth. You may be charged extra by your web hosting company, or may even justify slowing down your site altogether, even if your host includes "unlimited" bandwidth.
Hosting large media files also greatly increases the frequency of your backups and makes it difficult for you to restore WordPress from backups. Instead, you should use an audio and video hosting service like YouTube.
WordPress has a built-in video embed feature, so you can copy and paste your video URL directly into the post.
Use high-speed plugins
Poorly coded WordPress plugins usually overload, whether your site needs it or not. This will speed up page loading and slow down the site significantly. So, be careful and careful in choosing a WordPress plugin, and do not install unnecessary plugins in any way.
Reduce external HTTP requests
Many WordPress plugins and themes download all kinds of files from other websites. These files can include scripts, style sheets, and images from external sources such as Google, analytics services, etc. There is nothing wrong with using several of them. Many of these files are optimized to load as quickly as possible, so it's faster than hosting them on your website.
But if your plugins make a lot of these requests, it can slow down the website significantly. In this case, you can reduce all these external HTTP requests by disabling scripts and CSS or merging them into one file.
Reduce database calls
Unfortunately, there are many poorly coded WordPress themes. They ignore standard WordPress practices and end up making direct database calls or making too many unnecessary requests to the database. This can slow down your server. Even well-coded themes can have code.
In this example, every time you see <?php it's the start of a new database call:
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php language_attributes(); ?>">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>
charset=<?php bloginfo('charset'); ?>" />
You can't blame the theme developers for that. They have no way of knowing what language your site is in. But if you customize your site using a child theme, replace these database calls with your information to reduce all those database calls.
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
WordPress database optimization
After using WordPress for a while, your database will have a lot of information that you probably don't need. To improve performance, you can optimize your database to get rid of all that unnecessary information. This can be easily managed with the WP-Sweep plugin. This plugin allows you to clean up your WordPress database by removing items such as deleted posts, edits, unused tags, etc.
It also optimizes your database structure with just one click, and you will dramatically increase the speed and performance of WordPress.
Limit the review of posts
Edits submitted for review; It takes up your WordPress database. Some users believe that edits can also affect some database queries executed by plugins. If the plugin doesn't specifically remove post edits, it may slow down your site by searching through them unnecessarily.
You can easily limit the number of reviews WordPress keeps for each article. Simply add this line of code to your wp-config.php file:
define( 'WP_POST_REVISIONS', 4 );
This code limits WordPress to only save the last 4 edits of each of your posts or pages and automatically discards older edits.
Disable Hotlinking and Leeching of your content
If you are creating quality content on your WordPress site, the sad truth is that it will probably get stolen sooner or later. One way this happens is when other websites serve your images directly from their URLs on the website instead of uploading them to their servers. They steal your web hosting bandwidth, and you have no traffic to show for it.
Simply add this code to the .Htaccess file. Add your own to block linking images from the WordPress site:
#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yoursite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
Use Lazy Loading if needed
If you add images, multiple videos, and photo galleries to your blog posts, your site will slow down. Instead of loading all your images and videos at once, lazy loading only downloads the ones that are visible on the user's page. Replaces all other images and videos with a placeholder image.
When the user scrolls down, your website loads the images that are now visible in the browser's viewport. You can load images, videos, and even WordPress comments and Gravatar with lazy loading. For images, iframes, and videos, you can use the Lazy Load by WP Rocket plugin.
Use a DNS-level website firewall
A WordPress firewall plugin helps you block brute force attacks, hacking attempts, and malware. However, not all firewall plugins are created equal. Some of them run on the website, which means attackers can access your web server before it is blocked. This is good for security, but not good for performance. This is why we recommend using a DNS-level firewall such as Sucuri or Cloudflare. These firewalls block malicious requests before they even reach your website.
Fix HTTPS/SSL errors without plugin
If you're switching your site to HTTPS/SSL, you're likely to encounter mixed content errors. The easiest way to fix this problem is to install a plugin like Really Simple SSL. The problem, however, is that these plugins first grab all the URLs, then change them to HTTPS before sending them to the user's browsers.
This small function has a significant impact. You can reduce this amount and increase the speed and performance of WordPress by manually modifying all URLs.
The importance of increasing the speed and performance of WordPress
To rise in Google results, your site must comply with SEO parameters. Increasing the speed is one of the important tricks in On-Page SEO of the website.
Try all the techniques to improve the speed and performance of the site, and also test the speed of your website before and after implementing these methods to remember the changes and better techniques.
In the following, we will summarize the said items by presenting some frequently asked questions.
How to increase the speed of a WordPress site?
There are several solutions to increase the speed of the WordPress site, which is usually possible with the help of WordPress plugins.
What factors increase the speed of WordPress?
The importance of choosing the right host for WordPress, using the WordPress cache plugin, optimizing images, keeping WordPress up to date, optimizing behind-the-scenes processes, using content summaries on the main page and archives, dividing comment pages, using a content delivery network (CDN). , don't upload audio/video files directly to WordPress, use a well-optimized theme, use speed plugins, split long posts into more pages, reduce external HTTP requests, reduce database calls WordPress database optimization, limit post revisions, disable hotlinking and leeching of your content, use lazy loading if needed, use DNS level website firewall, fix HTTPS/SSL errors without plugins, use latest PHP version do.
How to optimize the WordPress database?
After using WordPress for a while, your database will have a lot of information that you probably don't need. To improve performance, you can optimize your database to get rid of all that unnecessary information. This can be easily managed with the WP-Sweep plugin. This plugin allows you to clean up your WordPress database by removing items such as deleted posts, edits, unused tags, etc. It also optimizes your database structure with just one click, and you will dramatically increase the speed and performance of WordPress.
Release date : 18 September, 2024