Title: CPU Usage spikes when editing posts
Last modified: September 21, 2021

---

# CPU Usage spikes when editing posts

 *  [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/)
 * I’ve recently started to notice in cPanel that the CPU Usage (and sometimes physical
   memory) spikes when I edit posts or even if I do something in the admin area.
   In general, I notice that the CPU fluctuates quite a lot, and can go from 5% 
   to 40% to 30% continuously.
 * My host (which is a good one) has looked into it and they can’t tell for sure
   what the problem is. They can see a lot of requests happening to admin-ajax.php
   with my IP.
 * What I have tried is to disable Cloudflare, WP-rocket cache and even one plugin
   at a time to see if it makes any difference, but no success.
 * I’ve also noticed that if I change PHP version from 7.4 to 8.0, the site slows
   down significantly and the CPU Usage goes crazy.
 * Any ideas what can be causing this? My site is fairly big with around 70k+ monthly
   unique visitors. I’m on shared hosting but not sure if that is really the issue
   because normally everything runs fine, I get 1.0s load time in GTMetrix when 
   cached, etc.
 * This problem is mostly related to me editing posts, although, as mentioned, the
   CPU seems to fluctuate all the time.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Kuldeep](https://wordpress.org/support/users/soberbanda/)
 * (@soberbanda)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14896151)
 * [@danniee](https://wordpress.org/support/users/danniee/) Normally, CPU usage 
   does spike up significantly when you leave your dashboard open for longer periods
   because of AJAX Calls from the API that provides real-time communication between
   the server and browser. It can also be a result of one or more plugins. You can
   further read here:[https://wordpress.org/support/topic/editing-post-causing-crippling-cpu-spike/](https://wordpress.org/support/topic/editing-post-causing-crippling-cpu-spike/)
 * You will need to limit the activity of the WordPress Heartbeat API in order to
   reduce CPU usage while editing posts. You can use this plugin: [https://wordpress.org/plugins/heartbeat-control/](https://wordpress.org/plugins/heartbeat-control/)
 * If the issue is from outside of WordPress, You can use this plugin to block bad
   requests: [https://wordpress.org/plugins/block-bad-queries/](https://wordpress.org/plugins/block-bad-queries/)
 * Let me know if it helps!
 *  Thread Starter [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14896774)
 * Hi [@soberbanda](https://wordpress.org/support/users/soberbanda/) and thank you
   for your kind help.
 * I tried installing BBQ Firewall, but it made no real difference. CPU Usage keeps
   fluctuating.
 * Regarding Heartbeat control, I already do that with WP Rocket, so that didn’t
   solve the issue either.
 * I checked the thread where others also have issues with CPU spikes when editing
   posts but it seems they didn’t come to any conclusion.
 * Still wondering what to do about this. Not only does CPU spike when I edit posts,
   it fluctuates all the time and can go to 50% without me even doing anything.
 *  [Kuldeep](https://wordpress.org/support/users/soberbanda/)
 * (@soberbanda)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14896887)
 * Sorry to hear that [@danniee](https://wordpress.org/support/users/danniee/)
 * Do you have some transient API calls or cron jobs running in the background?
 * I suspect it’s a plugin. Make sure you have stable versions of those plugins.
   Here is another thread on this: [https://wordpress.stackexchange.com/questions/13465/high-cpu-memory-spikes](https://wordpress.stackexchange.com/questions/13465/high-cpu-memory-spikes)
 * You can also use this plugin to further check for issues: [https://wordpress.org/plugins/health-check/](https://wordpress.org/plugins/health-check/)
 *  Thread Starter [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14897221)
 * Hi [@soberbanda](https://wordpress.org/support/users/soberbanda/) and thank you
   again for your kind help.
 * Not quite familiar with transient API so I cannot say for sure. It’s not something
   I have actively setup to the best of my knowledge.
 * No cron jobs running.
 * I did already deactivate one plugin at a time to see if it makes a difference,
   but it doesn’t. CPU will still spike when I edit a post.
 * I actually increased physical memory from 5GB to 20GB and it still managed to
   max out at one point. This is quite bizarre.
 *  [Kuldeep](https://wordpress.org/support/users/soberbanda/)
 * (@soberbanda)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14897836)
 * [@danniee](https://wordpress.org/support/users/danniee/) I would suggest moving
   away from a shared host at this point. It maybe due to a bad neighbor around:
   [https://www.reliablesite.net/hosting-news/what-is-bad-neighbor-effect/](https://www.reliablesite.net/hosting-news/what-is-bad-neighbor-effect/)
 * You can go through this incase you wish to change: [https://www.wpbeginner.com/best-vps-hosting-compared/](https://www.wpbeginner.com/best-vps-hosting-compared/)
 *  Thread Starter [danniee](https://wordpress.org/support/users/danniee/)
 * (@danniee)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14898086)
 * Thank you [@soberbanda](https://wordpress.org/support/users/soberbanda/) I’ll
   check out the links. Could potentially be the shared hosting, yes. If things 
   don’t improve I will consider switching to Kinsta 🙂
 *  [Kuldeep](https://wordpress.org/support/users/soberbanda/)
 * (@soberbanda)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14898775)
 * [@danniee](https://wordpress.org/support/users/danniee/) Awesome – Your Welcome
   🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘CPU Usage spikes when editing posts’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [Kuldeep](https://wordpress.org/support/users/soberbanda/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/cpu-usage-spikes-when-editing-posts/#post-14898775)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
