How to Optimize WordpressWritten by Brad Markle
Wordpress is one of the most popular blogging platforms available, and is used widely for different types of sites. However, depending on how your Wordpress site is set up on your hosting account, it may not be running as efficiently as it could be. When your Wordress site is not running efficiently, it can load slowly and disrupt your visitors, and in more extreme cases, cause your site to consume more CPU and memory on the server.
There are some things you can do to optimize Wordpress so that it loads quicker and uses less server resources. I've devised a list of 4 things you can do to make sure that your Wordpress site is running in its peak condition.
- Keep Wordpress up to date
- Watch your plugins
- Use Caching
- Don't stack your pages
The Wordpress developers are always making changes and optimizations, so it's important that you keep your WP installation up to date. If you installed WP through Fantastico you can simply log into cPanel > Fantastico and upgrade there, or if you installed WP manually you can download the latest version at http://wordpress.org and follow their instructions for upgrading.
It's also important to keep your plugins up to date (which newer WP versions allow you to do very easily), but it's also important to not bog down your site with a ton of plugins. The more that the server has to load in a single page, the longer it's going to take. Since Wordpress has thousands of plugins available, it's very tempting to install more plugins than you actually need. Unfortunately, having too many site-facing plugins (or known "bad" plugins) installed in your WP instance is the #1 cause of problems related to slow loading and CPU/memory overages that our customers have reported. Therefore, you should disable any plugins you're not using or that you don't need. Generally, plugins that collect data from remote sites or run interactively (like chat plugins) are the most problematic on shared and v-dedicated servers.
The follow plugins specifically are known to cause issues:
wp-forum, wp digg, geo-mashup, wassup
We recommend the use of WP-Super-Cache as a caching plugin for Wordpress, which stores your Wordpress pages as static HTML files so they are accessed quicker the next time. This reduces the amount of calls made to MySQL as well as how often the server has to recompile PHP pages every time your site is loaded. Based on data that we've collected from our own customers that have experienced slow-downs with their site or CPU/Memory overages, we've seen that WP-Super-Cache can reduce CPU and Memory usage by up to 70%, and increase site loading time by up to 50%. It's also extremely easy to install with the author's step-by-step installation guide, which you can find at the link below:
The homepage of your site is prone to more hits than the rest of your site. That being said, you shouldn't "stack" your homepage with a lot of posts. Wordpress lets you select what you want on your homepage, whether it be a specific page or post, or a certain number of your latest posts. For bloggers (and as the WP default), the most common preference is to use the latest posts to populate the homepage, so if you choose this option try not to display more than 8-10 posts on your frontpage, or per page after that.
The content of your posts is also a factor in your site's loading time. If your posts contain streaming media, heavy advertisements, or large images, your WP site will take more time to load. Therefore, downsizing or limiting images and streaming media will automatically optimize your WP site.
Your theme is just as important as the content. Sites that receive heavy traffic generally accomodate that traffic by downsizing their site design so that it loads quicker. If your theme is heavily based on images and large flash headers, that may be causing your WP site to not load as quickly as it could. Reformatting your larger images to web-safe formats (like gif, jpeg, and png) reduce their file sizes, making them download faster for your visitors.