Wordpress performance

From DreamHost

Jump to: navigation, search

This is a page to help you troubleshoot perfomance issue with your Wordpress installation. Please edit and add your knowledge and experience.

If you are having Performance issues with Wordpress, your initial suspicion should be in your plugins and widgets.

In order to troubleshoot performance issue, you might try to get a specialized tool like Firebug. See #Tools

Contents

Plugins

If you are experiencing slowness, and you want to make sure its your WordPress`s fault (and not something on DreamHost`s end), simply disable all your plugins by pressing the "Disable all plugins" button. If your WordPress installation is suddenly much much faster, then you know you have a naughty plugin to blame.

You will probably notice that in your WordPress template, at each page source you can see how many queries and CPU time a page took. By reloading this page each time you activate one plugin, you can check which of them increases your queries and CPU time considerably. You will need to have WP-Cache disabled for this to work.

Also make sure to check your dashboard loading time as well.

There are a few plugins that have been discovered to create performance issues are:

  • Popularity Contest: This seems to slow down the dashboard AND the site. As it is quering the database, you might not see what is loading (so firebug won't give you a hint).
Performance on the site is not affected so but the "most popular" function can slow it down considerably.
  • WordPress Automatic Update: This plugin will eliminate much of the headache of upgrading from one version of WordPress to another. Its functionality is built into WordPress 2.7 or higher.
  • WPG2: Only gives a performance hit if you include pictures on your header/footer/sidebar as it need to query a second database. However usually the text content is loaded before the Gallery items start to load.
  • Bad Behavior: A very good Anti-Spam plugin that gives however a small performance hit
  • OpenID: As described in a blog-post, this plugin can be misused and you will be a target of CPU overuse spam. Your server will be instructed to initiate numerous (and continuous) PHP instances to pr0n/3rd-party websites, in order to extract the fake OpenID user's name & email information, which will consume CPU minutes and slow down your website.

Widgets

Be suspicious of all widgets (or sidebar content) that will force the user to poll other DNS servers. del.icio.us for example will link to various sites, which might delay the loading until information is passed to the user.

Also, check if your theme is using custom widgets do draw recent comments of posts. If this is not handled correctly, it will poll the database every time, considerably increasing your load. If you need to use this functionality, consider using the Post plugins which provide a caching mechanism and are actively developed.

If you're using a lot of Widgets, a good idea would be to use the WP Widget Cache plugin to reduce the processing time for their output

Cache

Displaying a Wordpress page is CPU intensive, especially considering that the page is created every time it is called upon. On a busy site, that can be thousands of times an hour.

There are several caching plugins available which promise to improve your loading times and decrease server load, allowing your site to handle large spikes in traffic like the Digg effect. Note that most of them will make it so that changes to your site aren't seen by anonymous users for a period of time, maybe five minutes to an hour.

  • Hyper Cache: A plugin designed especially for shared hosting and low powered sites.
  • DB Cache: instead of saving your final html output, DB Cache caches your database queries which means that it can help with bots and crawlers as well as normal users. Hyper Cache and DB Cache can be used together to great effect.
  • 1 Blog Cacher: This plugin uses WordPress advanced-cache system, and runs before WordPress is fully loaded. This makes it good as well for low resource sites.
  • WP-Cache: This was the very first caching plugin for wordpress. It's development has unfortunately stopped and now is considered obsolete.
  • WP-Super Cache: This is an improvement over WP-Cache and it provides a great performance boost. Unfortunately at least some Dreamhost users and Dreamhost PS users have had trouble getting recent versions of Super Cache to work properly. It also may require some knowledge about editing your .htaccess file.

FastCGI

You can activate Dreamhost's PHP FastCGI options which should improve your php code execution. If you are on a PS server, you will be also able to activate XCache support which will further improve your PHP times.

Database

You should take care to optimize your MySQL databse to avoid a "fragmentation" effect. The best way to do this is to use the WP-DBManager which includes a function to optimize your database as well as the capability to schedule this optimization to run at an appropriate timeframe (recommended once per month at least)

Tools

Some tools to help you troubleshoot performance issues

  • Firebug: A very handy toold that will display what is loading and how long it takes
  • YSlow: A companion to Firebug that might give you some pointers on what to fix and how.
  • Load Impact: a load testing service that hits your server with many simultaneous users. A free version does a 50 user test. Without caching, 50 simultaneous users brings Wordpress under Dreamhost shared hosting to its knees (watch the CPU load with 'top'). With caching, things should run smoothly :-)

Other Articles

Personal tools