As technology advances the demand for faster speeds has increased. Google themselves have even started to incorporate speed into their algorithm. While wordpress is pretty fast from the start, after you have run it for a few months the system can become bloated and sometimes sluggish. So, today we will be going over some plugins, tweaks and queries that will help you speed up wordpress and keep it running smoothly. So, lets begin!
Wordpress has a mass amount of plugins that you can be used to increase functionality, but the sad truth is that the more plugins you install the slower the site is going to get. Most of the time plugins that call to an external site are usually the culprit, but other plugins can be blamed as well. So, while you may be tempted to go on a plugin downloading frenzy it might not be the best choice. Stick with the plugins that you need or at least disable the ones that you’re not using at the time. Simply think of wordpress as your body; If you gain weight then you’re gonna feel a little more bogged down than usual and if you lose weight you’re going to feel a bit better.
One of the next things you can do to speed up wordpress is to cache your content. What caching does is it generates a copy of your web pages and stores them as a static file. These static files are then served to your readers and since the database isn’t being used to serve the content, the pages load faster. . I use the plugin Quick Cache and it has done its job wonderfully since the first day I’ve installed it. Now if you don’t want to cache your content for certain reason’s, then you can also look into cloudflare to help reduce the loading time of pages.
Once you have signed up and added your site to Cloudflare your site will be distributed through their network. Your content will be provided to user’s via the node that is closest to them, which decreases page loading times. Cloudflare also has a few features that is located in your settings under performance such as Auto Minify and Rocket Loader. Auto Minify automatically minimizes the amount of JS, CSS and HTML that is on your page. With that said, I have all the options under Auto Minify selected and I have had no problems.
But be warned that I have had trouble with Rocket Loader preventing people from commenting using Disqus.
Update: Cloudflare posted a comment that included a link to a fix that can make Rocket Loader ignore Disqus.
Now that we have covered some of the easier stuff, how about we start to dig a little deeper. Let’s say we mess with the database a bit? Always backup your database before doing anything related to it! Anyway, if you edit your posts a lot or have more than one author on your blog then you might notice the huge amount of revisions that are stored in your database. These restored revisions are just taking up unneeded space and can be easily deleted with a SQL Query I found on Lester Chan’s website. The following query will delete all revisions and its meta data:
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
I went to go find more queries after realizing how easy it was to clean up “waste” on a database. I decided to go past just deleting all my old revisions and decided to also drop all my spam comments and pingbacks. Which can be done with the following queries:
DELETE FROM wp_comments WHERE comment_approved = 'spam';
DELETE FROM wp_comments WHERE comment_type = 'pingback';
Now if you’re a person that doesn’t feel comfortable messing with the database then there are also plugins you can look into. I have tried WP Database Optimizer in the past and it does its job well, but I would look for the solution that does what you want it to do because each plugin is different. But always remember that optimizing your database isn’t going to do anything if it’s on a bad host. This brings me to my next point which is the importance of a good host.
Optimization isn’t usually necessary if you are already on a good host, unless you are a speed freak. Most hosts have already optimized their servers to give a wonderful experience to their clients. Now, if you find yourself using a service that is slow and using outdated software, then database queries and Cloudflare are the least of your worries. Consider using a hosting service like stablehost, which have some of the best speeds I’ve found!
These are some of the things I have done to make a speedy experience for anyone who visits Admining. I hope you have enjoyed these tips and put good use to them. If you have anything to add to this list, then feel free to share your knowledge!