Slow WordPress Blog Speedup Tips
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!
Excuse Our Appearance…
Excuse the appearance of this blog for the next little while. I’m trying various things to speed the blog up, as it is pokey and crashes for no good reason. Changing themes, removing plugins, playing with PHP memory limits… I hope to keep any instability to a minimum, but no promises!
AdSense Notifier 1.0.0
I love Allen Holman’s AdSense Notifier extension for Firefox, but it’s not always updated in the most timely manner. It stopped working a few weeks ago due to a Firefox upgrade. Luckily, it’s GPL code (free to modify) so I’ve taken the latest version (0.9.8) and modified it to work with the current version of Firefox.
I also took the opportunity to make a couple of other changes to it:
- The minimum refresh time between updates is now 5 minutes, down from 15 minutes.
- The word “AdSense” is spelled correctly throughout the user interface. The old “Adsense” spelling always drove me nuts
To install my modified version of the AdSense Notifier, which I’m calling version 1.0.0, please uninstall your current version (go to Tools -> Add-ons in your Firefox menu), restart Firefox and then click this link:
Install AdSense Notifier 1.0.0
You’ll be prompted to allow the install to proceed, so please do. Then another restart and you’ll be good to go. Your settings should be saved during this process.
If you have any problems, let me know.