The Unofficial AdSense Blog was a prime example of a slow WordPress blog, and it got to the point where I needed to fix things. So here are some things you can try to make your WordPress blog faster:
- Reduce the number of posts on the home page — I was showing the last 20 posts on the home page, so I’ve cut that down to just a few. (This will help with the home page, but not the site in general.)
- Add a caching plugin — Try installing WP Super Cache or some equivalent.
- Clean up the database — There is a MySQL database associated with your blog and it gets filled with unnecessary stuff as your blog grows. Install the WP-DBManager plugin and use it to optimize your WordPress database.
- Disable unnecessary plugins — I had some old plugins that I wasn’t using. Disable them. In fact, if you’re truly done with them, delete them entirely from your wp-content/plugins folder.
- Switch to a faster theme — Not all themes are equal when it comes to load times. Experiment with a few different themes to see if you can find one that works better for your site.
- Remove unncessary JavaScript — Is your blog full of JavaScript from various bookmarking sites and so on? Get rid of as much of it as you can.
- Upgrade your WordPress — Upgrade to the latest version of WordPress to take advantage of any speedups that have made it into the platform.
- Increase the PHP memory limit — Try adding more memory to PHP by setting the memory_limit property in your php.ini file to a larger value. If you don’t have a php.ini file, ask your hosting service to create one for you first, then modify it.
- Increase the database timeout — If you’re seeing a lot of “500 Internal Server Error” messages with your WordPress blog, especially when you’re accessing the administration pages, your database connection may be timing out prematurely. You’ll see this on shared hosting services a lot of times. I found a great post on robsnotebooks.com that shows how to do this and even provides a way for WP to automatically reconnect to the database if the connection is dropped. I had to modify the wp-db.php file for use with WordPress 2.9, though, so if you want a copy just drop me a line.
If none of the above tips work for you, it might be time to switch hosting services, or move away from shared hosting to a more dedicated solution. But that’s a whole different enchilada!