How to speed up Wordpress

Last updated: Feb 21, 20234 Min read

Of all the available CMS platforms WordPress is by far the most used platform of all. This is also one of the reasons there are many good optimization plugins and “tricks” available for it. The problem with WordPress is that it can get really slow when you leave it in its original install form without tweaking it, especially when a lot of plugins are installed along the way. All in all good reasons to list the best ways to speed this CMS up.

Test your website

Before optimizing your website it's a good idea to first test it with our website speed test. Using the test you can quickly see what the performance bottlenecks are and you can compare the before and after results when you are done optimizing your website.

Disable unused plugins

This one is easy and can be very effective. Just disable any plugins that you aren't actively using for the website. This can sometimes greatly speed up the website because plugins often come with a lot JavaScript and CSS files that are being loaded each time someone loads a page

Minimize the number of used plugins & disable slow ones

Some plugins can decrease the loading speed of your public WordPress web pages. Uninstall plugins you do not need to minimize this problem. Always test a plugin before you use it. When it slows down your website try to find a different way of fixing the issue the plugin helped you with in the first place. Use Query Monitor to detect which plugins are slowing your website down.

Defer or Asynchronously load scripts

Defer (JavaScript & CSS) or async loading scripts will decrease the load speed of your website because the loading of the scripts will not interfere with the loading of the page and the above-the-fold view. In short this means that even if these scripts load slowly your web page can finish loading and be seen by your visitors without loading the script first.

Stop unused JavaScript files from being loaded

A standard WordPress template loads the Jquery library in HTML head of the public web pages even though in many cases these web pages do not actually need Jquery for anything. Also, sometimes badly coded templates or plugins come with JavaScript files which aren’t used or necessary for the theme or plugin to function. These JS files, most often loaded from the header and the footer, slow your website down because the scripts take time to load and the file loading also adds extra HTTP requests. You can use this great plugin to stop files from being loaded, either sitewide or on a specific page of your choosing.

Use a cache plugin

Every time a visitor loads a page on your website WordPress looks for the freshest version of that page. This means it has to continuously load the database to retrieve this fresh information. In most cases the loading of the database is totally unnecessary because most pages do not change often after they’ve been created. A cache plugin fixes this problem by making a static copy of your web pages and delivering it to your visitors without loading the database with every visit, also known as caching. This can speed up the loading times of your web pages significantly.
One of the best plugins is WP Fastest Cache. W3 Total Cache is a great plugin as well. There are various other cache plugins that you can try out as well.

Enable browser caching

Browser caching enables you to save the web files of your website to the hard disk of your visitors. Now every time the visitor visits another one of your web pages these web files will be loaded from their computer, which speeds up the download process and greatly improves page speed.
More information on caching and how to make your website faster can be found here.

Enable Gzip compression

Enabling Gzip compression will compress your web files to a compressed Gzip file before they get sent to the browser of the visitor. Gzip can compress web files to as much as 80% of their original size. This compressed version of your web files is sent to the visitors browser (all browsers support Gzip) and automatically decompressed to load the original full file again. This will speed up your website because the Gzip file is smaller in file size compared to the original file. Resulting in your visitors having to download less bytes to download the exact same files. Go here to find out how to enable Gzip compression. Use the Gzip Compression Test to check whether it works.

Optimize your images

By minimizing the file size of your photos and images you can speed up the load times of your web pages. There are various tools to do this. To optimize PNG images or JPG images you can use the PNG Compressor or the JPEG Compressor, sometimes it can reduce the size by 50% or more. One of the most popular plugins for WordPress is the ShortPixel plugin. This plugin uses well-known image compression techniques(optipng, jpegtran, pngquant, pngout, and gifsicle) with a simple click of the mouse.

Lazy load photos

You should lazy load your photos for a faster visitor experience by improving the rendering of the above-the-fold content.

Inline CSS & JavaScript

Inline your CSS scripts and Javascripts to speed up the rendering of your web pages.

Can’t inline? Combine all CSS or Javascript files in one big file

For help on how to handle JavaScript files when it comes to page speed go here. About CSS files: Most WordPress themes load multiple CSS files, sometimes as many as 10 or more. This adds unnecessary HTTP requests which can affect website performance. Copy the scripts of all the CSS files and add it to one CSS file. Now go to the WordPress Editor, open the header.php code and replace all the CSS lines with one CSS code which points to the big CSS file. You may have to edit the wp_head function to achieve this. When you are able to edit the header copy the script from the big css file and place it inside the header in style tags like this: <style> the CSS code </style> You can also use the CSS Compressor to minimize the size of your scripts significantly. Make a backup of your script before you use this tool because it changes the structure of your script to make it the smallest possible.

Minify HTML, CSS and JavaScript

Use a plugin that can automatically minify HTML, CSS and JavaScript for you. A great one is Asset Cleanup. It works great on most websites and has very few bugs. Test it on your own website to see whether it works for you.

Use WP Optimize

WP Optimize is a neat little plugin which helps you clean and minimize your WordPress database. You can optimize and clean your MySQL database, empty the trash, remove post revisions, delete spam comments, remove pingbacks and trackbacks with one simple click of the mouse. With some websites it has reduced the database size by 80% or more. This improves the performance of your website since Wordpress databases clog up and become inefficient over longer periods of time. Use this plugin with caution, do not clean/delete things you aren’t sure of.

Want To Have The Maximum Page Speed Possible For Your Website?

We can help with that! We have professionally optimized the speed of thousands of websites. Because of this we know how to get the best results quickly while keeping our prices low. Get an instant price quote for our services now.