Slow loading sites annoy me. Given that this site was becoming increasingly slow and annoying, I recently made a number of changes and, as a result, performance is much better. If you run Wordpress on a managed host, read on. If you don’t maintain a blog or if you do so on a hosted service (ie Blogger), then this post isn’t intended for you.
Anyway, following is my list of steps to take to improve Wordpress performance:
- Optimize your MySQL database. With time, database performance can degrade. Cleaning things up on MySQL isn’t hard–WebKeyDesign has a good guide (just make sure to have a backup in case things go wrong). In addition, I’ve found that dropping unused or unnecessary MySQL tables (especially if they are large) can make a huge difference.
- Turn off plugins one by one to see if any create performance issues. Certain plugins, such as those that only affect admin views, have no noticeable performance impact on visitors. Other plugins, particularly those that modify a post’s content or access the MySQL database in an inefficient way, can slow things down more dramatically. The best way to tell if any plugins are problematic is to go through each individually and see if performance improves after deactivation.
- Remove any external services one by one to see if any create performance issues. Just as plugins can run slowly, some external services run like molasses. Google Analytics, in particular, was a problem for me. The data was great, but it wasn’t worth an incremental ~10 seconds of load time. It’s gone for now.
- Install a caching plugin. Wordpress 2.x comes with some built-in caching, but I’ve found that the wp-cache 2.0 plugin makes a big performance difference. Recommended. Incidentally, wp-cache can also help your site stay up if you are lucky enough to experience the Digg or Slashdot effect.
- Check your web server and switch, if appropriate. As writted about earlier, I was frustrated with my old host because my site’s load times varied tremendously–the same page on the same day (with the same template and plugins) could take anywhere from 5 to 60+ seconds to load. Despite multiple calls and emails, the old host’s support team was unable to determine why performance fluctuated so much. In response, I switched hosts–and have been very happy with the results. Load times are consistently much shorter. If you’re interested in a new host, read here for more info.
Any other tips or ideas?