High CPU usage again – yeah this problem seems to never go away if you have a WordPress blog and been hosting it on a shared account.
After I moved to HostGator a couple of years ago, I thought I would never see this problem any more until my account was suspended temporarily last Friday.
The HostGator administrator who helped me by giving me the general tips (that we all know anyway – make sure you check my WordPress optimisation guide) but also in specifically pinpointing that I have 3,000 WordPress tags that are being used by my related posts plug-in. This definitely increased the overhead on the server as the plug-in needs to analyse my tags to display the related posts.
There was also a problem of my W3 Total Cache wasn’t running properly, because I use the Disk:Enhanced for the Page Cache settings. The administrator then set it to Disc: Basic (though I could do it on my own).
As for the WordPress post tags, I managed to cut them from 3,000 to 300. Yes, that many! Took me hours to optimise that one though it was a good excuse to clean up and optimise my post tags.
You might want to do some clean-up as well to speed up your blog and to avoid problems in the future like mine.
How to reduce and optimise WordPress Post Tags
1) Clean up all unused WordPress tags or tags that are only being used by one or two posts.
Do this by going to the WordPress Administration screen and click on the Posts-Post Tags. You should be able to see all your post tags. Go to Screen Options and put 200 (or more) Post Tags to be displayed so you can process more tags in one go.
On the list of tags and the number of posts, click on the “POSTS” to sort them from least to most. Then tick all the way through and delete the tags that are only being used by a single post.
I’ve seen a database SQL query than can do this nicely in one swoop. They are quite risky though and I didn’t dare to do it, simply because WordPress has made some changes on the recent versions, so I didn’t want to screw up my database.
OR EVEN BETTER:
2) Merge similar tags into one with the help of a plug-in
With the help of a plug-in called Term Management Tools, you can merge multiple WordPress post tags into one. After the plug-in activation, go to the same screen (WordPress Administration-Posts-Post Tags) but this time, notice there’s a new “Merge” menu on the drop down list:
Select multiple tags and then apply the Merge to combine them. For example, I combined all my Samsung related tags into “samsung” here:
Apparently I found tons of useless tags (tags that are too specific) and this issue helped me actually to pinpoint and optimise them further. Tags like “Firefox 3.2”, “Firefox 3.5” can be combined into “Firefox”, for example.
As of now, things seem to go back to normal. Glad I can still host this blog on HostGator shared account even with 5,000 visitors a day though that day may hopefully come where I have to move to a dedicated hosting.
Latest posts by Michael Aulia (see all)
- Win an iPad mini and 3x one-year licenses for Bitdefender Internet Security 2015! - 21 May, 2015
- Apple updates their MacBook Pro with Force Touch trackpad - 20 May, 2015
- Backup your notes at Evernote for free - 18 May, 2015