Website speed

We all know how important it is to have a fast website. If your website is slow, then your users are not going to have a great experience. If your site is taking ages for a page to load, then they are likely to leave before they even see your content. Search engines also take site speed into account when deciding in which position to place a website in the search results.

Luckily, if your website is running on WordPress, I have a few handy tips on how to increase your website speed.

Before you apply any of the techniques I am about to discuss, I suggest you test how fast your site is currently running. That way you can compare it after you have performed your optimisation steps, to see how much your website speed has improved. To test your site speed, go to this on-line speed test tool.

Just to clarify, the following tips are for self hosted websites running a WordPress installation, not websites running on WordPress.com.

Choose a great hosting plan

Your hosting provider will play a big part into how fast your website will run. This is why choosing a good hosting provider is pretty crucial to any business. If you are running a WordPress powered website, then we would suggest you go with a dedicated WordPress host. This is because they have been built specifically to help increase website speed, on WordPress powered websites. Below we have listed a few good and well know hosts…

Although these hosts are not the cheapest, we would say that they are among the best and as they say, you get what you pay for. We do however understand, that for small start-ups whose business is not a solely on-line business, spending a ton of money on great hosting is not always an option. This is why we have listed below, what we would call “second choices”. That means that they are not dedicated WordPress hosting companies, but do have good services and reputations and come at more affordable prices. They are however not really geared up to improve website speed on WordPress powered websites.

Choose a speedy WordPress theme

The WordPress theme you are running on your site, can play a big part in site performance. If your theme is making loads of MySQL queries, or a lot of http requests then your actual theme will be slowing down your site, rather than helping your website speed as it should. This is one of the reasons we build all our themes on the Genesis framework. We suggest that you grab yourself a copy, too. One of the great things about Genesis, is the fact that it has been tried and tested by a whole bunch of talented developers, and it has been built with speed in mind. All the child themes for Genesis (if built in the correct way) will inherit the super speed of the framework.

Genesis framework

Take out the trash

The introduction of the trash system, in WordPress 2.9, was a pretty cool addition to WordPress. The trash system will move any content that has been deleted into the trash folder. This applies to posts, pages, comment, media etc. From the trash folder, you can either restore the content or delete it permanently. This is a fail-safe system in case any content is accidentally deleted and it is pretty handy too. However it does come with a drawback, keeping items in the trash will clog up your database and can have an effect on your website performance.

By default, your trash will be emptied every 30 days however you can override this and tell WordPress to empty the trash as often as you like in order to help your website speed. Personally, I set my site to empty its trash after 7 days. This way I still have a fail-safe system in place, but my database is not getting clogged up for 30 days. This is a matter of personal preference though, you can set it to whatever you like.

To tell WordPress how often you would like it to empty the trash on your website, simply add the following to your wp-config.php file…

define( 'EMPTY_TRASH_DAYS', 7 );

The above code will tell WordPress to empty the trash every 7 days, you can change 7 to whatever you like. You can also completely disable the trash system if you like by adding the following to wp-config.php…

define( 'EMPTY_TRASH_DAYS', 0 )

Notice the above EMPTY_TRASH_DAYS  is set to 0.

Reduce post revisions and drafts

As with the trash system that comes built in with WordPress, post revisions and drafts will also take up space in your database. This is why you should always be wary of how many post revisions or drafts your WordPress installation is keeping.

A post revision is a way of reverting a post back to a previous version. This can be handy if a change in the post is made in error, reverting back to the previous version will undo this error. Your posts and pages will regularly create auto-saves as you are writing them and every time this happens, a new post revision is created. A new post revision is also created every time you manually save your post or page. What this means is, an article with let’s say 20 revisions will take up 20 times more room in your database than a post with only one revision would. Which as you can guess, will considerably increase the size of your database.

WordPress saves an unlimited number of post revisions by default, and I would say that in most cases this is not necessary. You can change how many post revisions a WordPress installation will keep by adding the following code to your wp-config.php file…

define( 'WP_POST_REVISIONS', 3 );

The above code will limit the number of post revisions that WordPress can keep per post to 3, which in turn will help keep your database as small as possible and should help towards your website speed. Alternatively, if you are feeling brave, you can completely disable the post revision functionality by adding the following code to your wp-config.php file…

define( 'WP_POST_REVISION', false );

Although the above code should help towards your website speed, we would not really advise completely removing the post revision functionality as that could be quite dangerous.

Keep an eye on plugins

Plugins can be a major factor into how fast or how slow your WordPress powered website is. Before any plugin is installed, it is a good idea to ask yourself if that plugin is really necessary as it can be easy to go a little overboard.

When installing a plugin, it is important to do a little research on the plugin, before you let it into your precious website environment. Things to consider when installing a plugin are…

  • Is it compatible with your current version of WordPress?
  • What rating does the plugin have?
  • How many times has the plugin been downloaded?
  • What are the general thoughts from the plugin’s reviews?

All of the above should be considered when installing a plugin if you would like to help your website speed and load time, as a bad plugin can be the main cause for a slow WordPress site.

Luckily, you can test how your plugins are affecting your performance by installing the P3 Profiler plugin, developed by GoDaddy. This is a handy plugin that will scan your entire plugin directory and give you some useful feedback on which plugins are having the biggest performance impact. This way, if you find a plugin that is causing a considerable performance drop, you can look for an alternative.

P3 Profiler

Be careful of social media links

Social media has become essential for any on-line business, it is simply something that cannot be ignored. One of the great things about most social media platforms is that they offer little snippets of code that you can add to your website to place sharing buttons on your site. This is a great way to gain exposure on social media. However, it does come with a draw back, as most official social media buttons make external http requests which slow down your web pages. In order to add social media links to your site while keeping website speed in mind, there are a number of plugins that have been created to get around this issue…

Alternatively, you can create a link with a locally-stored image file pointing to your social media outlets, which would also save server resources and increase your website speed.

Images affect website speed

The images on your website play a big part in your website speed. If your images are not well optimised or too large, then this will be having a negative effect on your performance.

Most image manipulation software such as Abobe Photoshop come with a “save for the web” feature which will save the image in the best format for the internet. We advise you to do this with all the images you upload to your website.

A great tool for images that have already been uploaded to your website is WP Smush.it. This is a handy plugin that when activated, will give you the option to run WP Smush.it on all your images, which will then utilise the Smush.it API to optimize JPEG images, strip meta data from JPEGs and convert GIF images to PNG. It is worth mentioning however, that when you are running this plugin on your images, during the actual “smushing” your website may take a slight performance hit as this is a fairly resource heavy plugin.

Smush.it

Another great plugin that will help with your website speed is Lazy Load. This is a fantastic plugin and I encourage you to use it whenever you can. To put it simply, this plugin will prevent your images from loading into your webpage until the image is in the users view port… pretty cool eh?

Gzip compression

Enabling Gzip compression is a good idea in order to improve your website speed. This is because enabling Gzip compression allows a web page to be transferred to a browser at up to 70% of its original size, helping with your website speed. To do this, go to www.yoursite.com/wp-admin/options.php and scroll down to the section that reads “gzipcompression”, simply change this value to 1 and hit save.

Cache and minify your site through a plugin

In order to improve your website speed using WordPress, you will want to use a caching plugin to cache and minify your web pages, CSS and JQuery.

Caching a webpage will allow WordPress to serve static HTML pages to your visitors rather than dynamic files. This makes serving the web pages much faster as there are no PHP commands or SQL queries running. You can also cache your CSS and JavaScript files. This means when a user goes from one page to another, they will only need to load the CSS and JavaScript on the first page.

Luckily, there are a few handy plugins that can take care caching and minification to help improve your website speed for free, see our list below…

The benefits of a content delivery network (CDN)

A content delivery network (CDN) is one of the most effective ways of increasing your website speed. When a visitor reaches your website, the content of the website will be getting served to the user via your data centre. This is fine, but if the user is on the other side of the world to your data centre, then to them your website will seem much slower compared to someone who is viewing your site from somewhere close to your data centre. A CDN will improve your website speed and make it consistent for all users no matter their location. This is done by hosting all your CSS, JavaScript and media files on multiple data centres all around the world. Then when a visitor reaches your site, they will be served the necessary files from the closest data centre to their current location.

Using a CDN can shave a great deal of time off your website speed, below are a few well know and reliable CDNs that you can sign up to…

Conclusion

With Google’s algorithm taking website speed into consideration, making your website faster is no longer just about giving your users a pleasant experience, it is also about performing well in search engines. As you can see from this blog post, website speed definitely be a consideration for anyone building a website. If you are using WordPress, you really don’t need that much technical knowledge to get a speedy website.

I hope you have enjoyed this post and have found it useful. If you have any questions or would like some advice on your website speed, please let me know in the comments.

Leave a Reply

You have to agree to the comment policy.