Speed Up a WordPress Website in 8 Steps

speed-up-wordpress

Although WordPress is one of the most complete and easy to use of blogging platforms out there, we all know that it is far from being the fastest and most optimized solution out of the box. Maybe due to the fact that WordPress was built with usability in mind, rather than performance.

Since nowadays, speed and performance are kings when it comes to SEO and user engagement (search for “page load time impact” on google, just don’t try to read everything because you will be overwhelmed), I decided to take a look on how to speed up my blog. Turns out that, with the right set of plugins and tools, it actually pretty easy to achieve a decent amount of performance improvement. In my case around 300% faster.

Site Performance Before Improvements
  • 7 Seconds to DOM Ready and 11 Seconds to Page Load (With Chrome Dev Tools)
  • 86 Points on YSlow (Grade B) on “Small Site or Blog” Test
  • 65/100 Score for Desktop on Google PageSpeed Insights
Site Performance After Improvements
  • 1.8 Seconds to DOM Ready and 4 Seconds to Page Load (With Chrome Dev Tools)
  • 95 Points on YSlow (Grade A) on “Small Site or Blog” Test
  • 76/100 Score for Desktop on Google PageSpeed Insights

This were the results I achieved after some research on the subject and a few hours trying different plugins. Since I wanted to be able to replicate this results in my other WordPress projects, I decide to compile them into a set of steps that I will present in this post.

8 Steps to Increase WordPress Performance

1. Optimize Media

Unoptimized images are one of the biggest cause of page load time and bandwidth waste on a website. And the solution is as simple as installing a plugin and running a bulk optimization on all your existing images and thumbnails.

Imagify-WordPress-Image-Optimization

Therefore, my WordPress plugin of choice for this is Imagify. This plugin requires you to register and generate an API Key but the free plan includes 50Mb of image processing per month (more than enough for a typical website). Another very popular option is WP SmushIt.

2. Lazy Load Images

Besides optimizing your images, you shouldn’t be loading your images until they are actually necessary. Lazy Load plugin allows you to load the images only when the user scrolls to their position. This saves initial load time and bandwidth is the user never scrolls to them.

3. Minify and Merge JavaScript and CSS

One of the most important factors in website performance is the number of requests made to the server and the size of the resources loaded by the browser. One solution to improve that is to combine all the JS and CSS files and minify them. Fast Velocity Minify or WP Super Minify do exactly that.

Also, moving the JavaScript files to the end of the page will reduce the page load time.

4. Analyze Your WordPress Plugins

Although is good that WordPress has a huge collection of plugins available, it’s also really easy to get caught installing too many unoptimized plugins that will drag down the website performance. P3 Profiler helps you analyze the time your plugins are taking on page load and which ones are dragging you down.

p3-profile-wordpress

5. Optimize the Database

WP Optimize helps to keep the database clean and optimized without any work or MySQL knowledge. With one click it will clean unnecessary data (like post revisions, old drafts, spam comments, etc) and compact/defragment MySQL tables to make your DB smaller and optimized.

6. Cache Content

Server and browser caching are essential for website performance, especially if the content is mostly static. For server caching, I use WP Super Cache because of its easy usage and configuration. W3 Total Cache is also very popular.

In addition to server cache, it’s also important to leverage browser cache. Far Future Expiry Header is a simple but efficient plugin that adds expires headers automatically to your files and images by configuring necessary .htaccess rules.

7. Use Cloudflare

Another important tip is to use Cloudflare.

cloudflare-logo

Their service is free for personal websites (starts at 20$/month for professional use) and includes:

  • DDoS Protection
  • Global CDN
  • Shared SSL
  • Files Cache and Minification
  • Analytics
  • Firewall
  • Mobile Subdomain Redirect
  • Among other features…

8. Use Nginx with PHP 7 and OPCache

Finally, but definitely one of the most important, have a decent machine that contains Nginx with PHP-FPM, PHP 7 and OPCache installed. If you’re still in your Apache / PHP 5 setup, change now! The results will be impressive.

To achieve this setup, check this installation guide.

In case you’re wondering, OPCache is basically a cache for your PHP code. It makes you code run faster by saving the already compiled code in cache so, unless the files change or cache is cleaned, it will not need to be compiled again in further executions.

To install, just follow this tutorial and then check the status of your installation using the OPCache Status script.

 

And that’s it!

Some simple steps you can apply in a few hours and check the difference.

Hope you found this article helpful and let me know in the comments if this steps worked for you.