Skip to content
CodeinWP content is free. When you purchase through referral links on our site, we earn a commission. Learn more

15 Ways to Speed Up WordPress Performance

How to speed up WordPress surely is a hot topic these days. Fortunately, there are numerous WordPress speed optimization techniques that you can employ to get the job done.

So, our intent here is to list every trick we know of that can make your WordPress site a lot faster.

speed up WordPress

Why should you speed up WordPress?

Key Takeaways

  • Fast-loading websites rank higher in search engines like Google.
  • A loading speed of over 2 seconds leads to 47% of visitors leaving.
  • Enhancing an e-commerce site’s speed can turn potential buyers into paying customers.

How to test the loading time of your website?

First things first, you need to analyze the current load time for your website. Keep in mind that this speed may differ from page to page, as it depends on various factors, namely:

  • the size of that particular page,
  • how many requests it generates,
  • whether it is cached or not,
  • and lastly, what kind of content (static or dynamic) it hosts.

The homepage of a website is usually used as a benchmark to test the load time. In order to check the speed of a website, the following three tools are used extensively across the web:

  1. WebPageTest.org
  2. Tools.Pingdom.com
  3. PageSpeed Insights (this doesn’t really report the page loading time, but does highlight the elements that you can tweak to speed up WordPress)

Okay, it’s about time to start talking some business!

15 ways to speed up WordPress sites

1. Choose a better web hosting provider

The major factor that influences the speed of a website is the hosting of your WordPress website. It might seem like a good idea to host your new website on a shared hosting provider that offers “unlimited” bandwidth, space, emails, domains and more. However, the point that we usually miss out on regarding this offer is that shared hosting environments fail to deliver good loading times on peak traffic hours, and most fail to provide 99 percent uptime in any given month.

Shared hosting tends to deliver a poorer performance because you are sharing the same server space with countless other websites, and there is no telling how much resources others are using. Plus, you don’t know exactly how well the servers are optimized.

Thankfully, the web-hosting industry has advanced with technology, and the prices of cloud hosting providers have decreased with the passage of time. In the present times, you can buy dedicated cloud servers from SiteGround, DigitalOcean, Amazon Web Services, and even Google Compute Engine at a nominal price. However, setting those servers up can be a daunting task as you are required to set servers up from scratch. There are web hosting providers like Cloudways who make the task of setting up optimized cloud servers as easy as click and launch.

2. Use a lightweight WordPress theme / framework

WordPress themes with a lot of dynamic elements, sliders, widgets, social icons and many more shiny elements are immensely appealing to the eye. But remember this: if they have too many elements and higher page sizes, then they will definitely cause your web server to take a thumping.

The best option here is to use a lightweight theme. One solution is to go for one of the default WordPress themes. Another is to try out something like Neve, which is our own in-house theme, and no, we’re not just recommending it because we built it. Neve truly is an amazing, lightweight theme. The fact that it’s been installed on over 300,000 WordPress sites is a testament to that. As is the fact that its average rating in the WordPress repository is five out of five stars. Finally, we can’t gloss over its blazingly fast load times when put through the rigorous performance tests (e.g., Pingdom, PageSpeed Insights) we mentioned earlier. Simply put: using Neve will definitely speed up WordPress for you.

Alternatively, for a feature-rich website, you can also opt for a theme that uses a good framework like Bootstrap or Foundation.

3. Minify JS and CSS files

If you run your website through Google PageSpeed Insights tool, you will probably be notified about minimizing the size of your JS and CSS files. What this means is that by reducing the number of CSS and JS calls and the size of those files, you can improve the site-loading speed.

Also, if you know your way around WordPress themes, you can study the guides provided by Google and do some manual fixing. If not, then there are plugins that will help you achieve this goal. The most popular of these is Autoptimize. It can help you optimize the CSS, JS and even HTML of your WordPress website.

4. Use advanced caching mechanisms with a caching plugin

WordPress caching plugins (e.g., W3 Total Cache) have been available for a long time, making the complex tasks of adding caching rules to your website elements easier. Combining such plug-ins with advanced caching mechanisms like Varnish could help you improve the loading speed of your website and ultimately speed up WordPress considerably.

5. Check your PHP version to speed up WordPress

PHP is the scripting language that runs WordPress on your web server. You can think of it as the “glue” of your WordPress site because it holds everything together.

Similar to themes and plugins, PHP also occasionally releases updates to run more efficiently. Although understanding PHP from a programming perspective might be too technical for many of you reading this, the general concept is easily understood:

  • Up-to-date PHP = WordPress loads faster
  • Outdated PHP = WordPress loads slower

You can always check the latest PHP release on the official PHP homepage. Unfortunately, the default WordPress settings don’t always make it as easy to check which version your site is using.

The best way to find out is to log into your web hosting panel and check the version there. If you’re not sure how to do that, an even easier approach is to contact the support team at your host.

If your PHP version is outdated, ask them to update it to the latest version. Before you do that though, make sure that you create a thorough backup of your current site. Updating your PHP might not cause any problems, but it has been known to happen. Having a backup available can allow you to quickly restore your site back to working order should any problems occur.

6. Optimize your images by using a plugin

There’s no way to beat around the bush on this: image size plays a pivotal role in how fast a WordPress site loads.

Therefore, optimizing images is a must if you want to make WordPress load faster for you. Of course you can do it manually and that might be alright for a very small project. However, if your WordPress site is a decent size and you plan on continuing to grow it, then manually optimizing images could start to feel unnecessarily time consuming. Fortunately, there are plugins available for just about everything you can think of, including image optimization.

One such plugin is Optimole, which has a very generous freemium option that will most certainly improve your WordPress site speed.

Optimole actually takes a multi-faceted approach to optimizing your images. It not only optimizes the image file itself – making it consume less disk space with no visual loss to quality – but then also serves your images through Optimole’s own delivery network to guarantee even faster load times.

7. Consider using WebP instead of JPEG or PNG

If you’re not familiar with WebP already, the non-technical explanation is that it’s an image format which is smaller in size compared to its more well-known counterparts – JPEG and PNG.

The slightly more technical explanation, courtesy of Google:

WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index.

Why is this relevant to speeding up WordPress?

Because images are the major contributors to the weight of a given webpage, and the heavier the page, the longer it takes to load. The trick is to reduce the size of your images, without noticeably or drastically sacrificing quality. That’s exactly what using WebP does.

To convert your JPEG and PNG files to WebP, you can use a free tool provided by Google and then reupload them to your WordPress site. Alternatively, again, you can install the Optimole plugin, which will convert your images to WebP on the fly and then serve the most optimized format automatically. If the visitor’s browser doesn’t support WebP, then the normal JPEG or PNG version of the image will be shown. This means you can get all of the site speed benefits of using WebP, but without all of the manual labor. This is one of the easiest ways to speed up WordPress!

8. Avoid uploading videos directly to WordPress

Let’s face it, videos are a great way to supplement information in an article or a WordPress blog post. Heck, we included a video at the bottom of this very post for that exact reason.

The problem with videos though, is that as a file size, they are generally huge. For comparison’s sake, consider that we just discussed optimizing images to speed up WordPress. Now think about the fact that images are measured in megabytes and kilobytes, while videos can often reach into the size of gigabytes*. Imagine you optimize all of the images on one of your blog posts to reduce the weight of it by 15 megabytes. You test the page loading time and it’s significantly faster. You’re happy as can be.

Then, you decide to upload a 200 megabyte video directly to that same post (via your WordPress media library). You can see where this is going.

Fortunately, there’s an easy solution to this, which is to upload your videos to an external video site like YouTube or Vimeo. You can then grab the embed code from whichever third-party video site you uploaded your video to, and embed the video into your post using that code. If you plan on adding any sort of videos to your pages then doing this is an absolute must to ensure good WordPress site speed.

*1,000 megabytes / 1,000,000 kilobytes = one gigabyte

9. Use a CDN to speed up WordPress

People who visit your website aren’t all necessarily located where your hosting company’s servers are. Needless to say, the speed at which your website loads is going to differ from place to place. The further away from the hosting server, and the slower the site-loading speed.

That’s where a good CDN (Content Delivery Network) can step in and fill the speed gap. CDNs do this by keeping a copy of your website in various datacenters located in various places around the globe. Then, depending on where your site visitor is checking out your website from, the CDN will load your content from the datacenter that is closest to them.

In other words, the primary function of a CDN is to serve the webpage to a visitor from the nearest possible location, thus helping to keep site-loading speed to the lowest possible minimum. Cloudflare and MaxCDN (StackPath) are among the most popular CDN services.

10. Enable GZIP compression

Compressing files on your local computer can save a lot of disk space. Similarly, for the web, we can use GZIP compression. This maneuver will dramatically reduce the bandwidth usage and the time it takes to gain access to your website. GZIP compresses various files so that whenever a visitor tries to access your website; their browser will first have to unzip the website. This process brings down the bandwidth usage to a considerable extent.

You can use either a plugin like the PageSpeed Ninja, which enables GZIP compression, or add the following codes in your .htaccess file.

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

11. Cleanup WordPress database

Database optimization, meaning deleting unwanted data from your database, will keep its size to a minimum and also helps in reducing the size of your backups. It is also necessary to delete spam comments, fake users, old drafts of your content and maybe even unwanted plugins as well as themes. All of this will reduce the size of your databases and web files, and thus speed up WordPress – your WordPress.

12. Deactivate or uninstall plugins

Keeping unwanted plugins on your WordPress websites will add a tremendous amount of junk to your web files. Moreover, it will also increase the size of your backup and put an overwhelming amount of load on your server resources while backup files are being generated. It is better to get rid of the plugins that you don’t use and also look for alternate methods to use third-party services for automating or scheduling tasks (like sharing of your latest posts to social media).

IFTTT or Zapier are two web services that help in automating such tasks and reduce the burden on your website and server resources.

13. Keep external scripts to a minimum

The usage of external scripts on your web pages adds a big chunk of data to your total loading time. Thus, it is best to use a low number of scripts, including only the essentials such as tracking tools (like Google Analytics) or commenting systems (like Disqus).

14. Disable pingbacks and trackbacks to speed up WordPress

Pingbacks and trackbacks are two core WordPress components that alert you whenever your blog or page receives a link. It might sound useful, but you also have things such as Google Webmaster Tools and other services to check the links of your website.

Keeping pingbacks and trackbacks on can also put an undesirable amount of strain on your server resources. This is so because whenever anyone tries to link up to your site, it generates requests from WordPress back and forth. This functionality is also widely abused when targeting a website with DDoS attacks.

You can turn it all off in WP-Admin → Settings → Discussion. Just deselect “Allow link notifications from other blogs (pingbacks and trackbacks).” This will help you speed up WordPress some more.

15. Use premium DNS

Last on our list of ways to speed up WordPress is the almighty DNS, which stands for domain name system. In layman’s terms, it acts as an intermediary between the human language terms for website names and their computer language (numerical) counterparts.

For example, you may have landed on this article because you used google.com to search for “how to speed up WordPress” or something similar. Now, in your brain, the Google website is something that is almost universally known to all other humans. Believe it or not though, your computer doesn’t identify Google in the same way that we do. To your computer, Google doesn’t reside at google.com, it lives at one of several IP addresses, some of which you can see below:

Google's IP addresses

When you type in a domain name like google.com or codeinwp.com into your browser, your computer contacts the domain’s nameservers, which send back the corresponding IP address in response. It then connects you. If a website’s nameserver is not accessible, your browser won’t be able to find the IP address to display the website.

Most domain registrars or hosting companies that provide domain name registration services will set you up with free DNS when you register a domain name with them. These free nameservers give you the barebones basics and allow for humans to be able to connect to your site, but they don’t necessarily care about how fast that connection happens.

When you upgrade to premium DNS, one of the features that comes with it, is a faster connection time between the DNS lookup and the rendering of the website. In short, by choosing premium DNS, your potential site visitors aren’t going to get frustrated and click somewhere else because your site is taking too long to load. That makes it another bonafide method to speed up WordPress.

Final thoughts on how to speed up WordPress

The biggest advantage of lowering your website’s loading time is that it will help tremendously in improving the experience of your visitors. The case remains the same whether they are using mobile devices or PCs. Furthermore, it will also improve your rankings in the SERPs. After all, reduced bandwidth usage of your hosting and faster site-loading speed on the client side will only benefit you both in the short as well as the long run.

If you haven’t started a blog yet, see this guide: how to make a site on WordPress. It’s a great resource that offers step-by-step tutorials on building a personal or professional blog.

Now it’s your turn. How do you speed up WordPress? Do you have any tricks up your sleeve?

Don’t forget to join our crash course on speeding up your WordPress site. Learn more below:

 
BONUS VIDEO: 6 non-obvious fixes to improve loading time
CodeinWP Editorial

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!

Most Searched Articles

Best JavaScript Libraries and Frameworks: Try These 14 in 2024

In this post, we look at the best JavaScript libraries and frameworks to try out this year. Why? Well, with JavaScript being available in every web browser, this makes it the most accessible programming language of ...

30 Best Free WordPress Themes for 2024 (Responsive, Mobile-Ready, Beautiful)

If you're looking for only the best free WordPress themes in the market for this year, then you're in the right place. We have more than enough such themes for you right ...

12 Best WordPress Hosting Providers of 2024 Compared and Tested

Looking for the best WordPress hosting that you can actually afford? We did the testing for you. Here are 10+ best hosts on the market ...

Handpicked Articles

How to Make a WordPress Website: Ultimate Guide for All Users – Beginners, Intermediate, Advanced

Many people wonder how to make a WordPress website. They’ve heard about WordPress, its incredible popularity, excellent features and designs, and now they want to join the pack and build a WordPress website of their own. So, where does one get ...

How to Start an Ecommerce Business: Ultimate Guide for 2024

Is this going to be the year you learn how to start an eCommerce business from scratch? You’re certainly in the right place! This guide will give you a roadmap to getting from 0 to a fully functional eCommerce business. ...