WordPress running slowly? – How to speed up your WordPress site
Recently I have come across a number of websites that seem to have ridiculous load times; on further inspection most of them are built on WordPress! Now I no that some large multi national organizations use WordPress as a base, such as the new CNN Political ticker website and IBN live, however these business’s can afford huge dedicated servers and content delivery networks. Some of us host our WordPress sites on shared hosting servers, which is where it can run into problems.
First of all it’s worth to take into consideration that WordPress has a large codebase, and the more code there is the longer it will take to load! There are a few steps that I have used to speed up WordPress sites in the past. This article looks to show you a number of things that can help you maximize your WordPress website load time in a few easy steps.
Validate your theme
To ensure that your theme will load as quickly as possible it is good practice to validate your theme as you develop it. There are a number of tools out there to help you ensure your theme complies with the latest WordPress standards. Personally I like to use the plugin Theme-check
The Theme-check plugin provides a valuable debug tool that shows easy to understand error messages. Generally it shows some errors that cannot be helped, for example it shows errors if you have hard coded links, which sometimes cannot be helped.
Plugins, comments and posts
The installation of lots of plugins can have a significant impact to your WordPress website load time. Try to keep the number of installed plugins to a minimum and delete unused ones. I do try to write most things myself to ensure I know what is going on however sometimes it can save a lot of time and effort to find a pre-written plugin.
Undoubtedly if you run a WordPress site you will have had some kind of spam via the comments section of your website. Cleaning the spam comments and deleting them from the database can optimize the database and speed up the load time of the website.
As spam comments, post/page revisions saved in the database can create a very large database that is unnecessary. Make sure you are happy with all your pages and posts before deleting the revision history! A very useful plugin to assist you in this is can be found here better delete revision
Caching in its simplest form is a saved “image” of your website that is displayed to a user looking at your website without the page requesting data from the database.
When WordPress loads a page, a lot of requests are made between the web page and database. The use of a caching plugin can speed up the load time of a page as it displays a copy of the page and by passes the database queries.
There are a great number of plugins to help you with caching; my favorite however is W3 Total Cache
You can run into some problems while developing if this is activated. I have many times made changes to a theme, saved and uploaded the files to find my changes aren’t working. After a period of panic and annoyance I find out that I am seeing a cached copy. So turn the plugin off if you are about to make changed to your theme!
There are so many factors that can impact a WordPress website’s performance. The points made previously have helped me in the past optimize my WordPress websites. Please comment with other ideas and techniques and share your knowledge!