Tips to speed up WordPress

Posted on January 29th, 2011

1. Upgrade WordPress

Upgrade with the latest version of WordPress is important. In every update, there are usually a lot of performance enhancements. WordPress developers release new versions with new features to improve the performance of WordPress sites.

In case of WordPress Plugins upgrade with new versions is important.  WordPress plug-in developers release new versions because they’ve modified the code in some way to make the plug in better.

  1. Deactivate or delete unused Plugins

If you’re not using a plug-in deactivate it or delete it. Because plug ins may slow down the site. There are many scripts or codes along with plug ins. Only keep necessary plug ins  for your site to run.

  1. Clean up your code

Below are some easy ways you clean up your code to load faster.

  • Decreasing Whitespace

Remove unwanted whitespaces in between codes. Coders like to use a lot of whitespace (indented tabs, line breaks, etc.) for better readability and organization. But, decreasing whitespace will speed up your site’s load time by decreasing the total size.

An example of using some whitespace:

.header {
font-family: Georgia, Times, serif;
font-size: 12px;
color: #000000;

An example of minimized whitespace:

.header {font-family: Georgia, serif; font-size: 12px; color: #000000 ;}

  • Using external scripts

Instead of placing so many codes in header.php file, use external scripts. This allows the browser to cache the script so it won’t have to read it for every other page.

An example of using external scripts:

<script type=”text/java script” src=”jquery.js”>

  • Using shorthand CSS

Using shorthand CSS is great for everyone. It allows for your CSS to be more concise, and it loads faster too!

An example of using long ass regular CSS:

.header {margin-top: 7px; margin-right: 1px; margin-bottom: 5px; margin-left: 3px;}

An example of using shorthand CSS:

.header {margin: 7px 1px 5px 3px;}

4.  Minimize PHP and database queries

Reduce PHP and database queries. Each time a page on your site loads, if your browser has to execute any PHP queries, it adds to the load time. If you replace the PHP queries with static HTML, every time a page loads, your browser just reads the HTML.