by Guest Author
This is a guest post by Vlatko. If you want to guest post on this blog, check out the guidelines here.
If your blog is on shared host but starting to get some serious traffic, then you are probably having problems with slow database queries, and in the future you might even be suspended because of exceeded CPU quota. The outcome will be frustration on your side and annoyed visitors on the other side.
The first reaction will be to file dozens of support tickets with the hosting company. After that you might consider moving to VPS or Dedicated Server, but before doing that you should try some tricks to improve the loading speed of your blog and survive higher traffic on shared hosting.
Important: before attempting to do anything with your blog please make a fresh backup of your database and WordPress files.
1. Use just few necessary plug-ins.
The less plug-ins you have, greater loading speed you achieve. So deactivate and delete the plug-ins that are not really necessary for your blog.
2. Use pure code in your sidebar instead of widgets.
This one seems radical but it’s very easy to implement. Make a research and you’ll find code examples for showing recent posts, categories, tags, etc. on your sidebar without use of any widgets.
3. Disable post revisions.
Post revisions are only building up your Database with records. The only thing you have to do is to put the following line in your wp-config.php file:
4. Remove extra tables in WordPress Database.
Login to your host, go to your phpMyadmin, open your blog database and you’ll see the table structure of your wordpress database. The default DB tables for wordpress are these ones:
If you have some extra tables (which are not used by your plugins at this moment) delete them. They are there just because you’ve installed and uninstalled plugins in the past. Some of the plugins create extra tables in the DB and when you decide to remove them some of the tables are staying there. You don’t need them, so drop them.
5. Clean up your WordPress Database.
For this step you’ll need one very useful plug-in. It’s called Clean Options.
Install it, activate it and use it to clean up your wordpress database. It will erase unnecessary, redounded, orphaned records. Then you are done with this plug-in, so deactivate it and delete it. After doing this, please test your blog and plug-ins for functionality. If some of your plug-ins stopped working, just reinstall them and you’ll be fine.
6. Repair and optimize your WordPress Database.
Go to phpMyadmin again, select your database check all the tables, and in the dropdown menu select repair. Select the database again, check all the tables, and in the dropdown menu select optimize.
7. Change php code with html where applicable.
This tip is probably the most powerful of all these tips. The point is that in the header (sometimes footer and sidebars) of your wordpress theme you have php strings that every time when your blog loads they call your blog name, location of favicon.ico, stylesheet, ping file, feeds, charset etc.
All these php requests are slowing down your blog so why not changing them to static html code.
For example the following code: