I've had a WordPress blog I've hosted on Dream Host for several years now. Recently (the past year) my site is going down often. Via Dream Host I found that I'm using up my CPU limit and they are killing my process. This used to happen twice a day, but I was able to get it down to maybe once a week. I did that by swapping my caching plugin from W3 Total Cache to another and removed some plug-ins. I'm still sometime getting my issue. To be honest, I'm an ASP.NET developer, so I'm used to debugging tools in my IDE and CMS applications. How can I get to the bottom of what is causing the CPU issues? Are there any WordPress tools? Also, my site is configured for the URL pattern http://hostname.com/{article slug here} so you'll notice I don't sub-folder by year, month, or category. Could this be contributing to the problem?

3 Answers 3


There are essentially two very different cases how WP site typically bring server down with symptoms of CPU overload:

Your site is not fast enough for your traffic

Simply put if your server can serve page every tenth of a second and you get more than 10 pageviews in that second - your resources are bankrupt. If your site going down heavily correlates with traffic spikes then you need either to make it faster or give it more resources.

You have a bug and/or configuration issue

This is much sneakier since it's not really performance issue. It's issue that causes some kind of crazy loop in a way that really burns CPU. It might not even be in PHP code, for example that tends to happen on some configurations when site attempts HTTP request to itself.

Things to do

  1. Install profiler, the lower level the deeper insight it will give you. NewRelic, munin, xdebug, xhprof, something WP level (P3 Profiler, Time Stack, Laps). Not at the same time! :) Depends on what is your hosting type, etc. Be careful not to crank it up too much from the start since any active debugger/profiler makes site slower to certain degree (ranging from unimportant to killer 300% slowdowns), which might instantly escalate the issue.

  2. Crank up the logging. Turn on WP_DEBUG, disable showing errors, log them to file.

  3. Drag site down to local install, apply the same (sans hiding errors), see how it behaves.

From there it's either having glaring performance issue light up like supernova (consider yourself lucky) or slow hunt for what goes wrong and under which circumstances it manifests.


To add to what @rarst said, some problems can be caused by Apache/mysql/php configuration options and they will be almost impossible to debug from wordpress or php and require OS level monitoring tools.

If your problem is typical one, then you will want to look at your apache config file and check what are the values of maxclient and maxservers are. Reducing those values may help your site avoid getting to peak memory and cpu, but will reduce the performance of your site.

Non efficient permalink structure can cause your site to respond slower but should not cause cpu overload.


If your CPU is bogged-down by PHP generating pages, you need to install a Profiler to see what is happening.

There could be a number of reasons why PHP is using so many CPU cycles. But you're blind unless you can figure out exactly how many microseconds each script & function is taking to run.

Once you get that data, you can begin to dig into the code to understand what its doing and then you can begin to optimize it.


XHProf was originally developed by Facebook to profile (and optimize) their PHP web application (facebook.com). It was open-sourced in 2009.

Facebook no longer maintains XHProf, and as development continued past PHP7, the XHProf code rot lead to a number of XHProf forks.

One of the best maintained XHProf forks is maintained by Tideways; it is available in the Debian repos and therefore can be securely downloaded & installed without downloading & compiling code from the Internet if you're using a Debian-based Linux server.

For more information on installing tideways-xhprof and configuring Wordpress to use it, see:


Excimer is an alternative to XHProf that's used by Wikipedia.

Unfortunately, I have been unable to find any guides on using Excimer with Wordpress.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.