Categories
Blog SEO

26 Ways to Speed up WordPress Website Performance – WPInquire

Speeding up your WordPress website’s performance isn’t a tough job. It requires some simple steps to be followed and tricks to be learned.

The idea of achieving faster WordPress performance can help you to attract more visitors, and skyrocket your website to the top of the Google Search.

Adding a simple plugin doesn’t do the job, you need to analyze every single part of your website and follow each step.

Why is speed important for a WordPress website?

In 2021 Google had released an update, which targets the speed of your website and the content loaded when a visitor clicks on your website.

This means that if your website is loading slow, Google will not list your website high.

But why does the speed of your website matter so much?

The Core Web Vitals (CWV) targets mobile-friendly websites. This means that if your website isn’t mobile-friendly, it will be dropped off the rankings of the new algorithm.

But that’s not all. In order to pass the Core Web Vitals, you need to have perfect mobile scores, otherwise, Google will rank a competitor, who passed his CWV with a better score.

Just 1 single second can take all of your good rankings away. That’s why you will need to optimize your WordPress website.

google core web vitals speed up a wordpress website

Google doesn’t only look for mobile-friendly websites but also uses its crawlers for mobile versions on the websites. This means that the mobile version of your website is prioritized over any other.

How to measure the speed of a website?

By looking at your website and counting until it’s fully loaded, you can’t guess what is the actual speed. There are tons of factors, which help measure site speed and the location is one of them.

Depending on the location that your website is being hosted, you will find out that speed is different for each country.

The more distant a country is from your location, the slower your website will load for its visitors. Not to mention that some people are having bad internet connections.

To get the idea of our website’s speed, we can use tools such as Pingdom or GTMetrix.

speed up wordpress website pingdom website speed test

The following result was made with Pingdom, by choosing the UK – London as a location. You can specify the location and see how much time it will take for your website to load in this certain country.

Once you get your website’s results, you will also have some hints on how you can fix the speed.

That would be enough to speed up your website and help you out. But there are more steps to optimize and even secure your website, so it can be fast for every country.

Ways to speed up your WordPress website performance

There are numerous ways to speed up a WordPress website, but also more ways to keep it clean and faster than your competitor’s website.

In this article, you will learn every single way that you can have the perfect optimization scores for Google’s Core Web Vital update and also get more traffic to your website.

Choose a better website host

Choosing a web host is the most crucial part of your website. If you go for shared hosting, you get what you pay for.

Shared hosting is a good idea for new and small websites, but not for medium to large business websites.

If someone overloads the server, you will also suffer, as you both share the same server resources.

Using a VPS or a cloud server can boost your speed and the initial response time. You will also be having dedicated resources, which won’t be shared with others.

There are numerous hosting providers, but the fastest ones are VPS hosts with LiteSpeed cache.

Use a fast WordPress theme or framework

Changing your website’s theme with a more optimized one can help you with speeding up your website.

WordPress has a large repository of themes, but not all of them are well optimized. Poorly coded themes can really drag your website down.

Other people prefer premium themes because they have a dedicated theme and support, but not all of them are lightning-fast. Most of the premium themes are full of features that you will not use, but they will still be loaded on your website.

Choosing a fast and lightweight WordPress theme can help you achieve better speed with your website.

There are numerous free and premium WordPress themes, which are well built and do not slow down your website.

Update themes and plugins

Keeping your plugins and themes up to date is a must when managing a WordPress website. Each new update provides better features than the previous one.

updating themes and plugins ways to speed up a wordpress wordpress performance

If you see that a plugin or a theme needs to be updated, you can go to the original site and see what is included in it.

Keeping your plugins and themes up to date can actually save a lot of resources and protect your website from being exposed to hacker attacks.

Update your WordPress version

WordPress has regular updates every season. Keeping it up to date is mandatory, in order to keep your website up and running.

Updating your WordPress version is also helpful, as they add more helpful features, which can ease up your work with the CMS.

But before your update, your WordPress website version, remember to create a backup, because if your website breaks, there will be no turning back.

Eventually, your web host holds backups of your website, but you will have to check up with them if these backups are automatic or have to be done manually.

update your wordpress version

Resizing your images

Images are often indicated as speed killers. Depending on your website and its theme, your will be applied in certain dimensions.

If your images are bigger than the dimensions given by the theme, they will not only rescale to fit, but also take more time to load on your website.

Resizing your images to fit your website reduces the time taken for your website to load and improves its speed to unknown extents.

There are numerous plugins like Smush, which can help with resizing your images, but you can also do it with Photoshop or any other image editor.

Convert your images to WebP

Converting images to WebP format can make wonders with your website. It helps it to load faster, reduces the total file size, and even removes the PageSpeed insights issue to serve images in next-gen format.

You can convert your images through any plugin, or just use LiteSpeed Cache. It helps a ton in saving potential image space, resizes images, and serves them as WebP images.

Other ways of converting your images to WebP are to use any online converter or PhotoShop.

WordPress handles the WebP images with no issue and your images will not break.

Compress your images

Images have a lot of data and can have a big impact on your website speed. Compressing your newly created WebP images can strip this data and make them even smaller in size, but same dimensions.

You can compress all of your images at once by using image optimization plugins. They gather all images and sent an optimization request, which later returns your image files with better file size.

Once you have compressed all the images on your website, you will see less page size and better speed.

The importance of compressing your images is that on desktop they may load faster, but since most of your visitors are using mobile devices it may take more time for them to load.

Lazy load your images and iframes

Images take a lot of time to load on your website, especially if your website has tons of images on the home screen or your blog posts.

Not to mention iframes. You may be wondering if you have them, but each WordPress website with embedded content has iframes. Each content that is being embedded on your website is loaded through iframes.

They both can take time to load, so lazy loading your images and iframes can fasten up the work.

Install Gzip on your website

Gzip is an essential part that you need to have on your website. It takes all the images and adds them to a single compressions file.

All of your images will be served through Gzip, which will fasten up the work on your website and improve your website speed.

Installing Gzip on WordPress requires a WordPress plugin or simple copy-pasting of the codes in your htaccess file.

gzip compression speed up your wordpress website

Install and set up caching on your website

Caching your website’s content is the most essential part of a website. By enabling a caching plugin on your website, you are creating a static version, which the visitor will receive every time he visits.

With caching plugins the speed of a website is significantly increased because visitors don’t need to download the full content each time they visit.

When you choose a caching plugin, you will see that you have full control over your website and how it is being shown to your visitors.

You have the full power to choose the TTL (Time To Live) for each of your contents and on top of that, you can choose how your scripts and other files load.

LSCache and WPRocket are by far the best plugins for optimizing and caching your website. They offer great support and do wonders with WordPress websites.

If you set your caching correct, you will see your website the same, but loading rapidly fast. In some cases people see their websites broken, but that is due to choosing the wrong settings.

If you need further help with caching you can check our articles:

Setup a CDN for your WordPress website

CDN is a Content Delivery Network, which saves your current website version and delivers it across the world as a cached file.

It does a pretty similar job to a caching plugin, but this doesn’t mean you don’t need to set up caching on your website.

With a CDN you can save your website in every possible data center and help your visitors access your website with almost no loading time. Even the visitors from countries far away from your original data center will

You can go for a paid CDN such as Bunny CDN, or if you are just starting out, give CloudFlare a try.

It does a really good job at caching visitor requests and speeds up your website at least x3 times more.

speed up a wordpress website cloudflare cdn

Setup security through your CDN – Under attack mode

The security of your website is a crucial factor, which can keep a minimal server load time. A single bot attack can slow up your website.

There are many competitors out there, who are ready to bot attack and take down your website.

If not competitors, you might stumble upon hackers, who can implement malicious code into your WordPress plugins.

Not long ago WordFence was targeted by such code and infected thousands of websites.

It is hard to find a trustable plugin to protect your website, but you can always go for the easy way. By enabling the Under attack or protection mode in your CDN, you can fully protect your website.

For example, in Cloudflare, the under attack mode keeps all the pesky intruders away from your website and prevents them from slowing down your website with bot attacks.

cloudflare website under attack

Disable pingbacks on your WordPress website

Pingbacks are another pesky task, which is implemented in WordPress. What pingbacks do, is to notify you through a comment, once someone has used your content or linked to your website.

A pingback doesn’t help in any way with your website but hurts it. Each pingback sends a request to the server, which slows the potential load time.

Disabling your pingbacks from inside your WordPress admin panel can accelerate the speed of your website and prevent spam.

Disabling the pingbacks in WordPress is an easy job. All you have to do is go to your Settings > Discussion and untick the square which says “Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.”.

Combine and inline internal CSS and JS

WordPress themes, as well as plugins, have a lot of CSS and JS files. On each load, the server has to take each file and start displaying it on your website.

You will see a prompt from Pingdom, PageSpeed, or GTMetrix that you need to combine and inline your external CSS and JS files.

The best way to combine and inline your files is through a caching plugin. Nowadays all of the caching plugins have these options.

W3 Total Cache does a perfect job at inlining and combining the CSS and JS files, without breaking your website.

w3 total cache combine and inline js and css files to speed up wordpress

Not only does it combine and inlines it, but also minifies the files. This means that all the extra spaces, lines, and comments will be disregarded and added to a minified, but more optimized file

Delete the unused themes and plugins

Once we change our WordPress plugins and themes with more suitable ones, we often forget our old ones stopped, but not removed.

Keeping your plugins and themes deactivated does not save speed. Each of them requires a certain amount of space, which can potentially slow your website.

Removing these unused files can speed up your website and save space.

Turn off your websites’ Heartbeat Control

Heartbeat is one of WordPress’s best ideas. Or was it? The heartbeat shows the health of your WordPress website, along with its performance.

It may give you suggestions on how you can improve your website, by adding certain elements, such as imagick and others, but after that, it is completely useless.

You can control the heartbeat and specify its timings, but stopping it or removing it is impossible. Except if you don’t have the correct plugins.

If you are an LSCache or WP Rocket user you can choose to control and disable your WordPress heartbeat, which will potentially increase the speed of your WordPress website and reduce the requests.

speed up wordpress heartbeat

Reduce Redirects

Redirects play a big role on our WordPress website, as it prevents a user from stumbling upon an error 404 page (broken page).

As you may have heard, redirects do have an impact on SEO. Too many redirections can result in an error and the visitor will not be able to see any content.

speed up wordpress error too many redirects

Not only it may result in errors but also can slow down your website.

Managing your redirects properly can speed up your WordPress website and minimize the potential threats.

WordPress doesn’t have any inbuild redirection options, so you will need to use redirection plugins to manage and improve the redirections on your website.

Clean up your WordPress database

After downloading and disabling so many plugins and themes, your WordPress database gets full of junk files, that are never cleaned afterward.

Keeping a clean database can help your website work faster and improve your loading times without too much work.

If you want to clean up your WordPress database you can use database cleaning pluggings and delete them afterward, as you will not need them anymore.

WP-Optimize is a great plugin for cleaning databases and keeping your website safe from breaking. It is completely free and can be deleted once the database has been cleaned.

Keep in mind that cleaning the database sets your website in maintenance and users will not be able to interact with your website and its content for a certain amount of time.

Disable comments on your website

Comments can often slow your website, especially when they are spammy and come in big chunks. In these situations, your website will take longer to load.

A good way to deal with this is to stop your comments from the beginning or by using WordPress commenting plugins.

These types of plugins prevent spam and also give a better design of your default comment fields. You can directly specify who can comment and when should a comment be flagged as a spammy one.

On the other hand, disabling your comments in WordPress save up a lot of space and prevent spammers from slowing you down.

Keep less external scripts

External scripts are the main cause why your website is slow. These types of scripts can be ads from any provider or even plugins.

In some cases we cannot let our external scripts slow our work, can we?

A good way to minimize these scripts is to combine all of them into one single file and defer them.

Caching plugins usually have the option to combine all internal and external scripts, and also deferring the JS will let them load after the HTML and CSS of your website.

If you are still having issues with too many external scripts, you can try searching for alternatives, as there are many lightweight alternatives, which do not harm but help your website.

Create a cookieless domain

Each plugin and script that your implement on your website may have cookies, which track your visitor’s behavior.

The more cookies you have on your website, the slower it will get. But you can’t simply remove these plugins and scripts as you may need them.

For example, Google Analytics and Google Adsense need cookies to track visitors and give additional data.

speed up wordpress website cookieless domain

The only way for speeding up your WordPress website is to create a cookieless domain, which will host all these cookies.

Cookieless domains are usually subdomains that handle all the cookies and work properly once a visitor clicks an advertisement or a page, without losing risking to lose any data.

Hide your default WP admin URL

By default, the WordPress admin dashboard URL is set to be yourwebsite.com/wp-admin. This leaves a wide-open door for hackers to come across your website and attempt to get your credentials.

Each try for logging in to your WordPress admin account gives a request to the server and requires time for the request to be fulfilled.

One thing we know about such techniques is that hackers use bots, and these bots try to sign in multiple times, which can have a heavy impact on your website’s loading speed.

Changing the default WP admin URL can always help because your admin URL won’t be exposed and your website speed will remain untouched.

You can change your WP admin URL by using plugins or inserting a script in your wp-config file:

define(‘WP_ADMIN_DIR’, ‘adminnew’);

define(‘SITECOOKIEPATH’, preg_replace(‘|http?://[^/]+|i’, ”, get_option(‘siteurl’).’/’));

define( ‘ADMIN_COOKIE_PATH’,SITECOOKIEPATH.WP_ADMIN_DIR);

And after this add another script in your functions.php file:

function wpadmin_filter( $url, $path, $orig_scheme ){
    $old  = array( "/(wp-admin)/");
    $admin_dir = WP_ADMIN_DIR;
    $new  = array($admin_dir);
    return preg_replace( $old, $new, $url, 1);
}
add_filter('siteurl',  'wpadmin_filter', 10, 3);

Reduce post revisions

Each time you change something in your posts on WordPress you get a saved version of it, called revision.

Revisions are small backups especially for posts, which let you go back in time and save an older version of your post.

While post revisions can be helpful, they can also slow down your website. Each revision takes space in your database and the posts with revisions you have, the slower your website will be.

Reducing the number of posts revision in WordPress can help boost your website’s speed and also save up space in your database.

You can find the most popular plugins such as WP Rocket. It lets you delete post revisions and set a timer on when they should be cleared from your website.

speed up wordpress website wp rocket post revisions

Use the latest PHP version

What PHP Version is your website running? It’s one of the most important things, as WordPress is built with PHP.

Every 2 years a PHP version becomes unsupported, which can leave your website vulnerable to hacker attacks.

By updating your WordPress PHP version, you ensure that your website will run the latest updates and be more efficient.

You can either change your PHP version through your default hosting panel or by asking your web host to do that.

Make sure to check the newest updates before changing as some features are not always included in the latest updates.

Use 3rd party websites for hosting media content

Keeping all the image files, videos, and/or music files on your website isn’t a good idea. It takes too many resources and slows your website down.

While hosting all of these files on your website is a bad idea, you can always host them on a separate website.

For example, you can add your videos to YouTube and embed them on your website through the embed code, which is given.

Hosting your media content on 3rd party websites significantly increase your website’s speed and works more efficiently.

Avoid page builders

This is more of an optional step as page builders do take a lot of resources to load your website’s content.

Elementor is a good example of how slow a website can be with all the nested “div” tags.

These tags add too much bloat and slow down your website, which will not let you pass your Core Web Vitals and rank high.

Not only Elementor gives such bad results, but it is also the same with Divi and other page builders, which can be changed with faster and better-coded ones, such as Oxygen, Zion, and others.

Now it may not be a big deal, but Google keeps utilizing websites that pass each test and push them higher in the rankings.