How to Speed Up WordPress Sites

Over the years, I have built a lot of WordPress websites, and the nagging question has always been, "How do I speed up this WordPress website?" This is because a website's speed is a truly integral part of user experience and SEO.

According to a case study, 47% of visitors expect a page to load in under 2 seconds, and 57% of visitors will abandon a page that takes more than 3 seconds to load. Google announced in a blog post a few years ago that its algorithm takes page speed into account when ranking websites. Thus, a faster website means a more efficient website experience for your users and an overall higher ranking in search engines. To speed up your WordPress website, you should consider the following:

Choose a good web host

Choosing a good web host and hosting package is crucial to your WordPress website speed. You should look out for a web host that is reliable and guarantees uptime, while providing a server that has a fast response time. You may optimise your website for speed, but, at the end of the day, it's your web host that's slowing down your website!

Choose a good theme/framework

You need to start with a fast and well-coded WordPress theme or framework. Most themes have bloated code and unnecessary features, and are not up-to-date with more recent versions of WordPress that negatively impact your website speed performance and security, leaving it open to vulnerabilities.

Choose and use good plugins

Most needed WordPress features are added via plugins. However, the more plugins you use, the greater the impact is on the overall speed of your website's loading times. Additional lines of code are added inline by plugins, and other such third party scripts such as Google AdSense.

You should ensure that you don't use more than 10 plugins at any given time on your WordPress installation. Furthermore, you should only use plugins that are well optimised for the latest version of WordPress, as well as those that are regularly updated, highly-rated, and have good reviews.

Enable caching

Caching is the best and fastest way to improve performance. WordPress caching enables static files to be served to users, thus reducing the server load and loading times. You should consider installing and configuring either the W3 Total Cache plugin, or the WP Super Cache plugin.

Use Cloudflare or Incapsula

After enabling caching, the next step is taking advantage of a free CDN (content delivery network). A CDN will supercharge your website's speed as it takes all the static files you've got on your website (e.g., CSS, JavaScript, images, etc.) and lets visitors download them as fast as possible by serving the files on servers as close to them as possible. CloudFlare and Incapsula both offer free CDN services that will greatly improve not only the speed but also the security of your website.

Regular maintenance

Once your WordPress website is up and running, you should keep an eye on the regular WordPress version and plugin updates. You should ensure that WordPress itself and all plugins are updated, as newer versions of plugins and WordPress are, in most cases, more optimised, faster, and more secure with little to no bugs.

Optimise your database

A WordPress database is the heart of your website because it stores all information related to your website (e.g.,pages, posts, comments, custom post types, theme settings, plugin settings, etc.). Over time, the database will grow larger and large, which will become fragmented, thus hindering the performance of your website. This will ultimately result in your server throwing back connection errors (also known as 'time-outs'), and retrieving data from the database will be a slower process. You can optimise your WordPress database directly from phpMyAdmin, or by using a plugin like WP-Optimize or WP-DBManager.

Turn off pingbacks and trackbacks

WordPress trackbacks and pingbacks are notifications generated whenever someone or another WordPress website refers any content or link from your website. These notifications utilise server and database resources. They should be disabled unless absolutely necessary. You can simply disable trackbacks and pingbacks from within WordPress's discussion settings.

Reduce post revisions

By default, WordPress saves post revisions automatically, and, over time, a website will store an extremely large amount of revisions as your posts accumulate, and your website grows. This causes the database to become bloated with unnecessary data. Eliminating unwanted revisions will also help you save storage in your database. The Revision Control or Better Delete Revision plugins allow you to manage and remove old post revisions from your WordPress database.

Reduce spam comments

Spam comments are another culprit that make the WordPress database grow in size and run slower. You should keep deleting spam comments from your website regularly. It's advisable to set up an anti-spam plugin to catch spam comments (and spammers) from posting them to your website. You should either set up the pre-install Akismet plugin, or the Anti-Spam plugin.

Optimise images

Images are an integral part of any WordPress website, but are also one of the heaviest elements of a website. This is especially true with extremely large images. They put a high level of stress on your web server, which impacts your website's loading times. You should compress and reduce the size of images to speed up your website.

You can compress your website's images by using WP Smush.it, or the EWWW Image Optimizer plugin. Both plugins will compress the images without much loss in quality and your website will load faster.

These are only some of the fundamentals of speeding up Wordpress, but they give the biggest impact. All of these optimisations are just a few minutes worth of work, and you'll get a faster site in no time.