Howto Optimize and Speed Up Your WordPress Blog

Do you have problem in your wordpress blog site. usually if your blog is on shared host but starting to get some serious traffic, then you are probably having problems with slow access to your site, and in the future you might even be suspended because of exceeded CPU quota or memory usage. The outcome will be frustration on your side and visitors will be annoyed by this problem too.

The first reaction will be to file dozens of support tickets with the hosting company. and the answer for this one is always the same, because you’re in shared hosting, you’re not allowed to use excessive CPU or memory, because of shared hosting limitation. 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 used in your wordpress, the greater loading speed you achieve. So deactivate and delete the plug-ins that are not really necessary.
  2. Use simple 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:

    define(‘WP_POST_REVISIONS’, 0);

  4. Remove extra tables in WordPress Database.
    Login to your host panel, and go to your phpMyadmin, open your wordpress database and you’ll see the table structure of your wordpress database.

    The default DB tables using by wordpress are these ones:
    – wp_comments
    – wp_links

    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.

  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:

    <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('stylesheet_url'); ?>" />

    Can be changed to:

    <link rel="stylesheet" type="text/css" media="screen" href="" />

    You can also:
    – make your pingback URL static,
    – make your feed URL’s static,
    – you can remove the blog’s WordPress version,
    – make your blog’s name and tagline/description static.
    – The easiest way to do this is to compare the actual header code of your blog with the outcome header code (right click, view source code in your browser). Look at the original php code and see what the results are in the outcome source code of your blog. By doing this you will realize which php lines you can change to static html lines. Don’t be afraid to experiment.

  8. And finally you can use WP-Supercache plug-in.
    Probably you’re already using this plug-in, but for the ones who don’t you should know that it will greatly speed up your blog since it saves and stores static html pages of your blog and serves them to the browser without any heavy impact on your host.


There are no revisions for this post.

Tags: , , , , , , ,

No comments yet.

Leave a Reply