21 effective ways to speed WordPress website

21 effective ways to speed WordPress website

When browsing the Internet, you may not think too much about speed WordPress websites. If your Internet connection is good enough, you can only come to two conclusions about each and every website in regards to speed – whether it’s fast enough or not fast enough. And that is how most Internet users will see a WordPress Website. Even if it’s appealing to a particular visitor, if the blog doesn’t load fast enough, you’ll lose that visitor. Sure. And that is why you must do everything in your power to speed WordPress website as fast as possible.

While there are many ways to speed WordPress website, some will require technical knowledge, some will require your complete dedication and some will simply be too expensive.

As always, WordPress can help you with this. Not only WordPress is constantly improving, but plugins, themes, and Hosting companies. In this article, we will show you how to speed WordPress website. There are many factors that affect website speed and depending on your site, you may be able to improve it in the next few minutes.

1. Use a caching plugin

By installing and setting up the caching plugin, you can immediately feel a change in your site speed. All web pages will have sections that are not frequently changed. Whether it‘s images, CSS, or JS files, the caching plugin can handle those files so they don’t have to be downloaded from the server every time a user opens your site. This will mainly help return visitors who already have those files archived.

There are many WordPress caching plugins out there, but only a few are popular. The good news is that those plugins are well coded, they speed WordPress website in no time, and they’re completely free! The most popular plugin for the job is Total Cache W3 which has over 1 million active users. Impressive! There are other plugins that can do the same, like the WP Fastest Cache Plugin that we mentioned in one of our previous articles.

2. Image optimization

Whether it’s just an image on your homepage or an entire library of images you want to display, images that aren’t optimized can slow down your site dramatically. Let’s say you’re using a camera that can take high-resolution photos. Those photos will likely be larger than 2MB and they can get over the 4MB limit easily. Even images from modern smartphones will produce large files. If you don’t think about it and you only upload a photo, imagine loading it on your website.

Just add a 2MB or 4MB “heavy” image, and your users will have to download it when they open your site. While users coming from a broadband connection won’t feel much of a difference, users with slower Internet speeds will be affected. Not only that; even Google will frown at slower load times, so your page ranking may suffer in the long run.

That shouldn’t be a problem as you can optimize images easily. First of all, if you’re not showing your latest work and you don’t need to display the images at full resolution, start by lowering the resolution. 

For example, if your theme displays a maximum width of 800px, your images cannot be wider than that. You can simply resize or maybe even crop the image. There are also many tools and apps that can help you optimize your images. Whether you want to use professional software like Photoshop which can do wonders to your images and optimize them specifically for the web or you want to use a simple online tool, you should optimize your images.

3. Homepage Optimization

Your home page is an important page. Even if a person doesn’t visit the homepage, they will likely want to access it from your other posts and pages. And that’s why the homepage has to be optimized correctly. As mentioned before, take care of the images on your website and make sure that they are optimized. Use smaller snippets for your posts instead of displaying larger snippets. Do not display images from posts; Instead, leave a “read more” link before the first image in the post. Don’t overuse sidebar and footer widgets that can slow down your site.

4. Get Google Maps Correctly

effective ways to speed WordPress website

Effective ways to speed WordPress website

If you’re using Google Maps to show a location, make sure the interactive map doesn’t slow you down. A simple map on your site can take up to 2MB, which will force your visitors to download additional data even if they don’t care about the map.

But if you are using WordPress, this task can become even easier. Yes, we are talking about the Google Maps Widget Plugin that can display thumbnails from your map. By doing so, you will only add a few Kilobytes of data to your site instead of a Megabyte or two. This will have a huge impact on your site speed, while your visitors interested in maps can still have the full Google Maps experience.

5. Database cleaning and optimization

WordPress uses a database to store practically everything needed for it to function smoothly. In a while, these databases will start to build up and they will start slowing down your site. By cleaning and optimizing the database, you can speed WordPress website. Fortunately, you don’t have to manually open each database and go through the thousands of lines stored there, but you can relax and delegate the work to another WordPress plugin. In this case, we recommend the WP-Optimize Plugin which is free and can run without PhpMyAdmin.

6. Remove unnecessary characters from the source code (minify it)

The source code can contain thousands of lines. By adding additional themes, plugins, and custom functions, the number adds up quickly and affects the speed WordPress website. While the code is often useful, having a lot of unnecessary characters found in the source code can only slow you down. Whether it’s a group of space characters, newline characters, comments, or block delimiters, you can safely remove them to speed WordPress website.

No, you won’t have to go through the source code to remove those characters manually; there is a WordPress plugin that can do the job for you. If you have installed W3 Total Cache to solve the caching problem, you already have a plugin that can be used to minify. Another popular plugin that can minify the code on your WP site is AutoOptimize.

Speed WordPress website takes time. There are a lot of things you can improve to remove that fraction of a second from load times. However, your site speed matters both from a visitor’s and search engine’s point of view. And, while you will have to go through different techniques and plugins to get the best out of your site, it will be well worth it.

Before going into the details, make sure you have the best hosting option. That’s the first step you need to have a fast website.

Now, let us show you how to manually minify CSS and JavaScript files, and list two plugins that will help you speed WordPress website. Ready?

What is shrink?

Before you get your hands on the files, let’s quickly see what it means to minify CSS and JavaScript files in WordPress. As you probably already know, there are dozens and dozens of files needed for WordPress to run properly. As you add new themes and plugins, the number keeps growing. At the same time, your site speed continues to decrease. Luckily, you don’t have to worry much about WordPress support code, themes, and plugins. But you should know that you can make those files smaller and thus speed WordPress website.

Minification is the process of removing unnecessary characters from the code. This process will make the affected files smaller, but will not change their functionality.

When you minify CSS and JavaScript files in WordPress, you get rid of things like spaces, newline characters, comments, and block delimiters. For each character removed from the code, you will speed WordPress website a bit. Here is a simple example of CSS code before and after minification.

CSS code before minification

body {

While this is much easier for the human eye, it uses characters that the machine doesn’t need to interpret the decoding.

CSS code after minification


To a calculator, this code looks like the code shown earlier. Newlines are not what the computer needs to run the code properly. If you look at the colors, you can see that we even removed a few numbers; a computer will still know the correct color. Note that there is no semicolon after the last element. In this simple example, we removed a few characters and made the code smaller. Now imagine what happens when you have thousands of lines of code.

Minify CSS and JavaScript files manually

When working on a custom WordPress theme or plugin, you’ll want to minimize the CSS and JavaScript files you’re working with. In that case, you won’t have to install additional plugins to do the job for you. Instead, you can quickly shrink only the files you need. This way, you can give yourself the freedom to type in easy code that you can still do as quickly as possible afterward. If you’re more serious about coding, you’ll want to consider using CSS and JS preprocessors. These complex apps can help you code, minify and crack it after you export the file.


With over 200,000 active installs, Autoptimize is one of the most popular choices when it comes to optimizing your WordPress site. Among other great features,  the plugin can minify scripts, styles, and HTMLIt will compress files, cache, and migrate code to speed WordPress website.

  1. Install and activate the plugin
  2. Go to   Settings -> Auto-Optimize
  3. Click   Show Advanced Settings
  4. Check the options  Optimize HTML Code, Optimize JavaScript Code   and   Optimize CSS Code
  5. Save changes

Total W3 Cache

This popular plugin does it all. Of course, the plugin will cache the files for you in the first place. But if you are interested in getting rid of query strings from static resources, W3 Total Cache will do it for you. Similarly, it will minify CSS and JavaScript files, and it will even do the same for your posts, pages, and RSS feeds. You just need to check it out.

  1. Install and activate the plugin
  2. Navigate to   Performance -> Minimize
  3. Make sure to always check the  URL Rewrite structure
  4. Enable HTML to minify settings, JS minify settings, and CSS minify settings
  5. Save all settings

As you can see, the minification process is quite simple. If you are using a WordPress plugin, you really have no excuse. Minify the CSS and JS files on your site and get back to the online speed and performance test of your choice. We are sure that you will get much higher scores and thanks from your visitors and search engines.

7. Choose a Fast WordPress Theme

Before you start working on your website, you should be careful when choosing a WordPress theme. At first, it may seem like a particular theme will attract more visitors simply because of its layout and stunning visuals. But try to think ahead; Instead of just choosing the best-looking theme you find, test several themes in different browsers, from different devices.

It will surprise you how much difference a single theme can make to an entire site’s speed. Not only can a large number of images choke a topic, but there are also a lot of things hidden in the code that can mean a huge difference. Although not always, premium themes should be better coded and perform better.

8. Don’t Install Unnecessary Plugins

As you start working on your website, you may want to install new plugins. While there are plugins that you will have to install and run, be careful not to overload your site. For starters, active plugins will definitely affect your speed WordPress website.
. Otherwise, even inactive plugins will take up your precious space, which will affect the size of your backup files. When you add everything, both active and inactive plugins can affect your speed WordPress website, so think twice before installing plugins you don’t really need.

9. Break up larger posts

If you tend to write really long posts where you also have a lot of videos and images attached, you should consider dividing them into multiple pages. This can be done very quickly since you don’t even have to use a plugin for it – WordPress has you covered, but you probably don’t even know about it.

10. Limit the number of times an article is edited

Post revision is a useful thing. But the reality is that most users don’t use them at all, or they don’t need more than a few revisions per post. Revisions are stored in the database and if you have a large number of posts imagine how many additional revisions there will be. This will definitely slow down your WordPress site, so make sure you limit the number of revisions or even remove them entirely if not needed.

11. Upgrade to PHP7. Now!

You should always try to do as little work as possible to get the most results. Optimizing your website for quick money is no different. Why spend hours optimizing just to reduce a few milliseconds when you can make a few clicks and easily speed WordPress website by 20%. There is no magic to our method. It’s clear, simple, and easy to understand. Once you do it, you’ll ask yourself “why didn’t I do this sooner.”

Many tests show that PHP7 is 20% faster than PHP5 in a real production environment. In general tests, it can be 200% faster. It’s also more secure, has new useful features, and is recommended by WordPress. So how to upgrade?

If you’re using a good hosting company, you’re already using PHP7, so check your version before proceeding. Either get the WordPress Health Check Plugin or upload a file with the phpinfo() function. Already on PHP7? Great! You are done. Using PHP5? Please remove it.

Login to your cPanel. If you don’t have the link, just add “:2083” to the end of your domain name i.e.   http://www.mydomain.com:2083,. Once you’re inside, look for an icon that says “PHP Selector,” “Select PHP Version,” or “PHP Version Manager” under the “Software” section. Click the icon to open the PHP version selector. Depending on what your hosting company has enabled, you will be able to choose PHP versions for your entire account, for specific domains, or at a per-directory level. Whichever scenario is enabled in your cPanel, make sure you choose v7.0 or v7.1 for your WordPress installation. Click to save”. Refresh your site to verify the change is life and enjoy the speed.

12. Improve WordPress speed by modifying browser caching

When a user starts loading your website, their browser immediately starts downloading all the necessary files from the server where your website is located. Depending on the user’s internet connection speed and the server’s capabilities, the website may load faster or slower. Of course, each party wants to load websites as quickly as possible and you, as the administrator, must do all in your power to make your website lightning fast.

Improve WordPress speed and store static files longer

The first visit to your website depends entirely on your internet connection and server, but you can make changes to your regular visitors. They probably won’t know that changes have been made, but they will always keep in mind how fast your site really is. You can put yourself in their shoes – if websites take a few seconds to load each page, you probably wouldn’t stick around for too long no matter how good the content, would you?

Caching technology takes some files from the server and stores them on the local computer. Then, if the user visits the same website again, the browser will examine the stored files and will download them immediately instead of downloading them from the remote server again. This makes load times much shorter, improves the speed WordPress website, and makes visitors much happier.

By using the following code, you can tell WordPress to cache static files for a longer period of time. Before you run to copy and paste the code, take a minute to review – how often do you make changes to your site, what type of content do you have, and is this really helping the site? you’re web if you extend caching it?

  • Open the .htaccess file
  • Copy and paste the following:

# Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access
1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

  • Save changes

After you save the changes, your server will change the access time to store those files locally. If you’re not comfortable modifying the .htaccess file yourself, you can do the same using a simple plugin.

13. How to remove query strings from static resources in WordPress and speed WordPress website

If you are trying to speed up the WordPress website and optimize your WordPress site, you have probably come across various online diagnostic tools that can help you with that. We encourage you to take the tests; they will tell you how well your site is doing and most of those tools will give you details about your speed WordPress website.

For example, if you run a test on  GTmetrix, it will show you which images are slowing down your site. It will show you the loading speed of style sheets and scripts, minification insights, and much more. One of the things many WordPress users notice at the top of the list (meaning the problem must be resolved as quickly as possible) is “removing query strings from static resources”. In this section, we’ll briefly explain what query strings are and how to quickly get rid of them to improve your site’s speed.

What is a query string?

Query strings are parts of a URL that you can find after a question mark (?) or an ampersand (&). External browsers or applications often add these sections to the URL to add additional parameters.

For example, using query strings, a WordPress plugin can pass different values ​​via URL so that other apps and services can use them.

Usually, after clicking on an ad, article from a social network, or your email inbox, you will see a rather long URL with query strings. To let analytics services know the source of your visit, other services (and the people themselves) add  UTMs  – specific query strings that describe sources, mediums, and campaigns. Marketers use this to track the effectiveness of their campaigns. And this is completely normal; don’t worry about this kind of query string.

Why and when should you remove query strings?

While query strings are an important part of dynamic elements, they can slow down your WordPress site if they are used in static resources. If you’ve ever opened the browser console while on your website, you may have noticed that the site is showing the version number of the script and the style. This may look familiar:


Some proxy hosts and CDNs cannot cache these types of resources. That means every time you open a web page, the server will have to send you the file over and over again. And that’s what slows down a website so much. Just one query string won’t make much of a difference, but when you stack a few strings things can get serious. It’s finally time to resolve the issue and remove the query strings from the static resource.

How to remove query string from the static resource

There are several techniques to remove query strings from static resources in WordPress and we are about to cover them for you. You can do it by duplicating a simple function or you can use a couple of WordPress plugins that will take care of the problem for you. Whichever technique you choose, you won’t go wrong – you’ll be removing query strings from static resources in the next few minutes and speeding up your WordPress site in no time.

Add a simple function

The first method requires you to simply copy and paste a simple function into your functions.php file. If you’ve ever added a function there, you already know it’s no big deal. But if this is your first time, exercise extreme caution as a small mistake in the file can render your site unusable. Just to feel safe, please make a backup copy of the file before you proceed.

  • Open and edit the functions.php. file
  • Copy and paste the following code:

function _remove_script_version( $src ){
$parts = explode( '?ver', $src );
return $parts[0];
add_filter( 'script_loader_src', '_remove_script_version'
,15, 1 );
add_filter( 'style_loader_src', '_remove_script_version'
,15, 1 );

  • Save changes

Uncheck the option in W3 Total Cache

Since W3 Total Cache is a popular plugin that currently has over a million active installs, chances are that you are already using the plugin. In that case, you’ll just need to uncheck an option from the settings:

  1. Navigate to   Performance -> Browser Cache
  2. Uncheck the option Prevent  caching of objects after changing settings 
  3. Save changes

Use the plugin Remove Query String from Static Resources

If you don’t want to add the code to functions.php yourself, you can use a free plugin for the job. Remove querystring from static resources is a lightweight and simple plugin that will do the same thing without requiring you to touch the code.

Just install the plugin, activate it and you’re done. The moment you activate the plugin, the query strings will be removed from the static resource.

Regardless of the technique, you used, getting rid of query strings shouldn’t be a difficult task. Now that you’re done, you can run another scan on the speed and performance tool of your choice to see if your score (and site speed) improves.

14. Reduce the number of HTTP requests and speed up your WordPress website

While all you need to load a web page is a click of a button, computers can handle much more. That one click and one second it takes until a page is rendered in front of you can hide dozens, if not hundreds, of HTTP requests to the server. Obviously, the more information goes back and forth, the longer you’ll have to wait for the web page to load. One of the simplest things you can do to speed WordPress website is to have a good hosting company. But when you decide to go even further to speed up your WordPress website, you should take care of HTTP requests.

For starters, you should test your site to see how many requests it takes to load a particular page. There are different ways to check. Instead of showing you all the possibilities, you can simply enter a URL into the HTTP Request Inspector. You’ll get instant results, and hopefully, you won’t have more than 30 requests. If you do, it’s time to reduce the number of HTTP requests and speed WordPress website.

15. Don’t Use Gravatars

If you are using the default WordPress commenting system, you are also using Gravatars. Now, if you get a few comments a month, this shouldn’t bother you much. But if your visitors like to leave quick notes below your articles, you should consider removing Gravatars from images.

When we tell you that each Gravatar image adds another HTTP request to the server, imagine what happens when you have more than, say, a hundred comments on a page? Guess what happens when there are over a hundred additional requests that don’t have to be there – yes, your site is slower.

If you don’t need those little images next to each comment, just navigate to   Settings -> Discussion -> Avatars and uncheck the option to show avatars in comments. It’s as easy as that. In case you only need an avatar, you should consider installing a 3rd party commenting system for WordPress, which will handle things differently. For example, Disqus is a popular choice that renders profile pictures much faster.

16. Remove comments if you don’t use them

As you might have guessed, using comments requires additional files. If you’re using the default commenting system, you don’t have to do anything – that’s to your advantage and the additional request is justified. But in case you don’t use comments on your site or you use another commenting system you should remove the comment reply script. To do that, you need to copy the following function in the functions.php file:

function comments_clean_header_hook () {
wp_deregister_script ('comment-reply');
add_action ('init', 'comments_clean_header_hook'); function
comments_clean_header_hook ()
wp_deregister_script ('comment-reply');
add_action ('init', 'comments_clean_header_hook');

17. Remove Emojis

Very cute emoticon. Yes, everyone uses them on their computers, smartphones, and tablets. Although WordPress introduced them in version 4.2. that doesn’t mean you have to load an extra JS file on your site just to have a smiley face. The speed of your site should be more important than having emojis (unless you just can’t live without them).

18. Using CSS Sprites in WordPress

As you can see when examining a page, each image requires an HTTP request. That doesn’t mean you should delete photos, but you should take care of them. When it comes to your speed WordPress website, learn how to optimize images for WordPress. But when it comes to requests, you can reduce the number of those HTTP requests by creating CSS Sprites.

If you go to  Sprite, you will be able to select all the images from a page that you use and combine them into one file. After changing the link to the image, you will increase the image size, but at the same time, you will reduce the number of requests. This may sound counterintuitive, but you can really speed things up – a server will do better with a large file than having to respond to dozens of requests.

19. Limit the number of social network buttons

Social media has become a standard part of every website. Whether you have a personal or small business website, or you are running a portal with dozens of writers, you will have to connect social media to the site. That’s okay, and you should do it.

But when it comes to displaying social buttons, less is more. While you may have opened accounts on dozens of networks, the buttons are only visible to the ones you love the most. Each button will load its own image, and additional files can slow down your site.

20. Download scripts and styles you don’t use

An average WordPress user has no clue what’s going on in the background. Who has time to think about scripts and styles on a website? We don’t blame you for that, but now that we’ve got your attention, take a moment to check your site for scripts and styles you don’t need.

You don’t have to be an expert. We showed you a neat little plugin that will show you all your scripts and loading styles on each of your pages. By using WP Asset CleanUp, you can easily recognize files you no longer need and you can quickly download them. If you have more experience with WordPress, the plugin will help you isolate the data and then you can manually delete the files. If not, leave it plugged in and let it handle the scripts and styles for you.

21. Turn off embedding

To improve user experience, WordPress developers have introduced a new JS file that allows you to embed videos from different services like Youtube just by copying the URL. You can embed images and tweets the same way simply by pasting the link into the Visual Editor.

While this is a great feature, many people don’t use it. If you are trying to speed WordPress website, it is more important to delete a request than to preview the video. You know what video you’re embedding, so there’s really no need to get a preview, right?

If you are not good at coding and you just need to install a plugin, there is a simple plugin that will remove embedding from your site. If you can handle a few lines of code that you just need to copy, use the following function and place it in your functions.php file:

function speed_stop_loading_wp_embed() {
if (!is_admin()) {
add_action('init', 'speed_stop_loading_wp_embed');

Take your time and check your WordPress site for those unwanted HTTP requests. Even if you reduce the count to just a few pages, or if you just find a file that you don’t have to load, it will be a success. Do not worry; Even if your users don’t feel an improvement in speed, search engines will.

Conclusion: Always care about the speed of your blog

If you only make changes to a few things on your site, you can benefit from them. The steps we have described in this article are completely free, so there should be no problem when you try them out. However, don’t forget to take care of your website; Update WordPress, themes, and plugins on a regular basis and never neglect your blog.

Sometimes even an optimized website doesn’t run fast. In that case, you will have to look for another hosting company or consider paying extra for a managed or dedicated server.

Click to rate this post!
[Total: 1 Average: 5]
Notify of
0 Góp ý
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x