How To Reduce CPU Usage In WordPress: Aim For <50% For Better Server Efficiency

Reduce cpu usage wordpress

High CPU usage is often caused by plugins that constantly collect data, preload/cache expiration settings in cache plugins, bad bots, no CDN, plugins, and WordPress Heartbeat.

Shared hosting is known for CPU throttling (that’s why it’s so cheap). When your website uses too much CPU, it’s throttled so it doesn’t affect other websites sharing the server. This can lead to a slow website, admin, and even 5xx errors. Before you upgrade, talk to your host and ask if they can spare you some temporary resources while you use this tutorial to optimize your site.

I wrote this guide after getting frustrated with SiteGround’s CPU limits which is a common issue in Facebook Groups. I don’t want to spam you and say “switch hosts” but this was the only thing that fixed it (even after upgrading plans and spending several days optimizing my site). I moved to Cloudways Vultr HF then recently to, but there are plenty of hosts that can reduce CPU usage with Cloudflare Enterprise, more resources, and efficient servers such as LiteSpeed.

Of course I’m an affiliate and want to make money by telling you to switch hosts, but I honestly don’t care who you use. Just think twice before you upgrade plans especially if it’s SiteGround.


1. Remove High CPU Plugins

Plugins are infamous for creating background tasks.

Any plugin (or plugin module) that has to collect data will probably be your worst culprit. This can be Wordfence’s live traffic report, Rank Math’s 404 logs and Google Analytics integration, or even plugins like Broken Link Checker and Query Monitor which constantly scan your website.

Some people will tell you to deactivate and reactivate plugins 1 by 1 and make sure they’re lightweight. This is broad advice and can be impractical. You can still use some of these plugins as long as you disable or tweak their settings to use less resources by limiting background tasks. However, some plugins are infamous for increasing CPU usage and should be removed entirely.

Tools You’ll Need:

  • Query Monitor – find your slowest plugins. Once installed, view a page on your site, find the Query Monitor menu in your admin bar, and go to Queries → Queries by component.

Slow wordpress plugins query monitor

  • WP Hive – free Chrome Extension that lets you browse the WordPress plugin repository and see whether a plugin impacts memory usage (as well as PageSpeed Insights scores).

Wp hive high memory usage plugins

  • WP-Optimize – shows you which plugins (or plugin modules) add the most database overhead. You can also remove tables from old plugins as well as other database junk. This image below shows how using many Rank Math modules can add lots of overhead.

Rank math database bloat

See the full list of 75+ slow plugins.

Plugin Category Memory Impact PageSpeed Impact
Analytify Analytics X
Backup Buddy Backup X
iThemes Security Security X
Broken Link Checker SEO X
Jetpack Security X X
Query Monitor Analytics X
NextGEN Gallery Gallery X X
Site Kit by Google Analytics X
Wordfence Security X
wpDiscuz Comments X X
WPML Translate X X


2. Limit Heartbeat, Autosaves, Post Revisions

These are more background tasks and should be limited.

Heartbeat runs every 15-60 seconds, autosaves are created every 60 seconds while you’re editing, and post revisions are stored every time you update a post (which aren’t limited at all).

Perfmatters does all of these. You can also do it manually with code or many cache plugins let you limit Heartbeat (i.e. FlyingPress + LiteSpeed Cache) as well as the Heartbeat Control plugin.

Limit Heartbeat – creates requests to admin-ajax.php. I would disable it in the frontend and dashboard, then limit post editor to 120s since you probably want it there for autosaves, etc.

Heartbeat control plugin settings

Or paste the following code into your functions.php file after the <?php tag.

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {

Increase autosave interval – WordPress stores an autosave every 60s which is a little much. You could increase this to 120s or even to 300s by adding the code to your wp-config.php file.

define('AUTOSAVE_INTERVAL', 300); // seconds

Limit post revisions – WordPress stores a post revision every time you edit a post and hit the publish button. This creates a lot of database bloat since they’re not limited by default. Since you still want a few backups of your old posts (just in case), you could limit post revisions to 10.

define( 'WP_POST_REVISIONS', 10 );


3. Limit Preloading In Cache Plugins

Preloading in cache plugins is another culprit. Some plugins let you change how preloading works while other plugins don’t (in that case, try disabling it completely).

You should only preload important sitemap URLs. Preloading your entire sitemap means tags and other non-critical pages are preloaded and consumes resources. Find your sitemap URL (i.e., copy the most important URLs (i.e. pages/posts), and add them manually. Disabling preload entirely is another option since it’s known for increasing CPU usage. The screenshot below is for WP Rocket but the LiteSpeed Cache Crawler and most other cache plugins have options to control how preloading works. Check their documentation.

Wp rocket sitemap preloading

You can also increase the preload crawl interval using WP Rocket’s helper plugin or again, check your plugin’s documentation. Increasing the default interval from 500ms to 3000ms (or more) prevents your cache plugin from preloading URLs faster than your server can handle.

They have another helper plugin to disable automatic cache clearing. Any time you do one of these things, the entire cache is deleted and rebuilt. A better alternative is to set up a cron job to control when the cache is cleared and which pages are cleared (you can also do this with preloading). This way, you’re not constantly clearing the full cache when updating your website.

Finally, try disabling the “preload links” setting. If users constantly hover over internal links (especially on websites with lots of image links like WooCommerce products), this means those pages are constantly downloading in the background. Similar thing if you’re using Flying Pages.

Other Cache Plugin Settings That Impact CPU Usage:

  • Cache logged-in users (usually leave off)
  • Separate mobile cache (usually leave off)
  • Remove unused CSS (decrease the batch size)
  • LiteSpeed Cache guest mode, cache commenters, server stale


4. Use Cloudflare To Reduce CPU Usage

Cloudflare is your best friend for reducing CPU.

One thing that reduces CPU usage is improving cache hit ratio (with full page caching/APO) since uncached requests to your origin cause more stress than requests cached by Cloudflare.

  • CDN: offloads bandwidth to their 270+ data centers.
  • Bot fight mode: blocks bad bots from crawling your site.
  • Crawler hints: helps search engines avoid wasteful crawls.
  • Hotlink protection: stops websites from stealing image bandwidth.
  • Browser integrity check: extra layer to block bots/spammers/crawlers.
  • Argo: limits number of data centers that ask origin for content (paid service).
  • WAF: firewall improves security and reduces usage simultaneously (paid service).
  • Firewall rules – block bad bots, hackiest countries, specific URLs, XML-RPC, etc.
  • Rate limiting – identifies/mitigates excessive requests to specific URLs (paid service).
  • Full page caching: caches HTML to improve cache hit ratio and reduces origin requests.
  • Cloudflare Enterprise: has the best Cloudflare Enterprise (compared to Cloudways/Kinsta) mainly because it has full page caching, WAF, and built-in WAF rules to protect your site while only allowing about 10% of traffic to actually hit your origin server.
Cloudflare bandwidth
Cloudflare bandwidth savings (darker “cached bandwidth” is better)
Cloudflare proxy
Activate Cloudflare’s CDN by changing your website to “Proxied” in the DNS settings
Cloudflare hotlink protection firewall events
View what’s getting blocked in your firewall events


5. Protect Your WP-Login Page

Your login page is a common target for bots/attacks. Even if they don’t successfully login, attempting to create requests. Here’s how to protect the login page and stop these requests.

  • Limit login attempts: control how many times users attempt to login, lockout period, XMLRPC gateway protection, and other features using the Limit Login Attempts plugin.
  • Move the wp-login page: bots aren’t usually smart enough to find a custom login page which you can change using Perfmatters (if you’re already using it) or WPS Hide Login.
  • Use to protect the login: if you’re using with LiteSpeed, they have several security features to protect the login page, so I wouldn’t move it in this case.
  • SiteGround Security plugin: while I’m not a fan of SiteGround, their security plugin can move your login page, limit login attempts, disable XML-RPC, and help protect your site.

Perfmatters move wordpress login


6. Replace WP-Cron With A Real Cron Job

The wp-cron is loaded on every pageview and schedules automated tasks like publishing scheduled posts, checking for theme and plugin updates, sending email notifications, etc. Replacing this with a real cron job gives you better control and can help reduce CPU usage.

Before setting up an external cron job, the first step is disabling the built-in wp-cron. Add the code to your wp-config.php file before where it says “That’s all, step editing! Happy blogging.”

define('DISABLE_WP_CRON', true);

Now we’ll set up an external cron job. This can be different depending on your host (cpanel, VPS, etc). I suggest Googling instructions for them since SiteGround, Bluehost, Cloudways, and Hostinger all have their own guides. In cPanel, you would open the “cron jobs” tab and use the following line to set a cron job for every 10 minutes. You may think a higher interval would be better for CPU, but this can cause CPU spikes since too many jobs are running at the same time.

wget -q -O - >/dev/null 2>&1

Cron job 10 minutes

External cron job

External cron job cpu spikes

WP Crontrol is nice for changing the schedule of specific cron jobs and deleting jobs with no action. You could also offload cron jobs from your server using a Cloudflare JavaScript worker.


7. Install Redis Or Memcached With OPcache

Both help reduce CPU usage, but your host must support them.

Opcache memcached redis


8. Stop Using Garbage Mainstream Hosts

Avoid mainstream hosts like SiteGround, Hostinger, Kinsta, WPX, Bluehost, and GoDaddy.

Most are shared hosting but lack resources (cores, RAM, or they have strict CPU limits which force you to upgrade). They also use SATA SSDs when NVMe is faster, and Memcached when Redis is faster. Or they have other issues like SiteGround’s Optimizer plugin doing a poor job with web vitals, their DNS getting blocked by Google, history of TTFB issues, and threatening people who write bad reviews (that’s why you don’t see more of them). Hostinger has multiple scam reports and WPX blamed a dead CEO for a global outage. I could go on why you shouldn’t use these, but let’s just say their “marketing” is generally better than their specs. There, I said it.

SiteGround Cloud Jump Start Plan WP Engine StartUp Plan Kinsta Starter Plan Cloudways Vultr HF (2GB) Starter Plan (Who I Use)
Type Cloud Cloud Cloud Cloud Private cloud
Server Apache + Nginx Apache + Nginx Apache + Nginx Apache + Nginx Apache + Nginx
Cores/RAM 4 cores/8GB Not listed 12 cores/8GB 1 core/2GB 32 cores/128GB
Storage 40GB / SATA 10GB / SATA 10GB / SATA 64GB / NVMe 10GB / NVMe
CDN Google Cloud Cloudflare + Polish Cloudflare + full page caching + firewall rules Cloudflare Enterprise – APO ($5/mo) Cloudflare Enterprise
CDN bandwidth Unmetered Not listed 100GB 100GB Unlimited
DNS Internal (previous issues) Internal Amazon Route 53 DNS Made Easy ($5/mo) Cloudflare
Cache plugin SG Optimizer x x Breeze x
Object cache Memcached Memcached Redis ($100/mo) Redis Pro Redis
PHP processor FastCGI HHVM FastCGI FPM LiteSpeed
PHP workers Not listed (but common issue) Not listed (but common issue) 2 PHP workers No limit No limit
Memory limit Adjustable 512MB 256MB Adjustable 1GB
Database MySQL Not listed Not listed MariaDB MariaDB
Nginx reverse proxy Manual configuration $50/mo
Bandwidth or monthly visits 5TB 50GB + 25k visits/mo 25k visits/mo 2TB 50GB + 250k visits/mo
Email hosting x x x x
Malware removal Scanner only x Removal pledge x Imunify360
Major incidents TTFB/DNS/CPU issues, unethical 2015 breach None None None
Migrations $30/site Paid (quoted) Free (most hosts) 1 free + $25/site Unlimited free
TrustPilot rating 4.6/5 4.5/5 4.2/5 4.5/5 4.9/5
Price $100/mo $25/mo when paying yearly $29/mo when paying yearly $35/mo with CF Enterprise $25/mo when paying yearly

Specs of popular cloud hosts

SiteGround GrowBig Hostinger Business WP WPX Business A2 Hosting Turbo Boost NameHero Turbo Cloud (Recommended)
Type Shared Shared Shared Shared Shared
Server Apache + Nginx LiteSpeed LiteSpeed LiteSpeed LiteSpeed
Cache plugin SG Optimizer LSC LSC or W3TC LSC LSC
CDN Google Cloud / XDN
Full page caching via QUIC via QUIC via QUIC via QUIC
DNS Blocked by Google for 4 days Internal / QUIC Internal / QUIC Internal / QUIC Internal / QUIC
Cores/RAM Hidden 2 cores/1.5GB 1 core/1GB 2 cores/2GB 3 cores/3GB
Storage 20GB / SATA 200GB / SATA 15GB / SATA Unlimited NVMe Unlimited NVMe
Object cache Memcached Memcached x Redis Redis
Database MySQL MariaDB MariaDB MariaDB MariaDB
Resource limits CPU limits are common Low resources Low resources Efficient with LiteSpeed Efficient with LiteSpeed
Inodes 400,000 600,000 At discretion 600,000 500,000
Control panel Site Tools hPanel WPX Panel cPanel cPanel
Email storage 10GB 1GB Many limits Unlimited Unlimited
Major incidents TTFB/DNS/CPU issues, unethical Scam reports, fake reviews, 2019 breach Global outage blamed on dead CEO 2 week ransomware attack 2 day node outage with apology letter
TrustPilot rating 4.6/5 4.6/5 (fake) 4.9/5 4.4/5 4.6/5
Migration $30/site Unlimited 5 free Unlimited 1 free
Intro price $3.99/mo (1 year agreement) $3.99/mo (2 year agreement) $20.83/mo (1 year agreement) $6.99/mo (3 year agreement) $9.98/mo (3 year agreement)
Renewals $24.99/mo $14.99/mo $20.83/mo $22.99/mo $19.95/mo
Specs View View View View View

Specs of popular shared hosts

Unless you have a fast global TTFB in KeyCDN’s performance test or SpeedVitals, you need to rethink your hosting/CDN setup since those are 2 main TTFB factors. Another solid tool to test hosting performance is the WP Hosting Benchmark plugin. TTFB is also 40% of your LCP score.

Keycdn global ttfb
KeyCDN’s performance test
Wp hosting benchmark tool
WP Hosting Benchmark plugin

These Are Better:

  • – you should really read my full review to understand how they average a <100ms global TTFB, but it comes down to better specs and their Cloudflare Enterprise. Sure, you get 32 cores + 128GB RAM, NVMe storage, Redis, and no PHP worker limits. But Cloudflare Enterprise is a powerhouse for reducing TTFB especially since uses both APO and Argo Smart Routing (unlike Cloudways). And since Cloudflare Mirage/Polish optimize images (very well), you shouldn’t need a plugin for image optimization, CDNs, or security. The main con is low storage/bandwidth, but if you have that 1 site you really care about, it’s worth it. I also can’t speak highly enough about Ben Gabler and their support team who don’t do aggressive marketing (which is why you probably haven’t heard of them). You can try them for $1 your first month when you checkout using my code OMM1
  • NameHero Turbo Cloud – for all you LiteSpeed people, I recommend NameHero for shared LiteSpeed hosting (FastComet is also good, Krystal for UK-based sites, and Scala for LiteSpeed on a cloud VPS). All these use LiteSpeed which means you will use LiteSpeed Cache + CDN (one of the fastest setups on a budget). I like NameHero’s Turbo Cloud plan because you get 3 cores + 3GB RAM and NVMe SSDs. But their data centers are only in the US & EU, in which case, use one of the other ones I listed. Also make sure you use’s standard plan which uses full page caching and (unlike the free plan) uses all 80 PoPs with DDoS protection.
  • Cloudways Vultr HF – they need to add APO and fix annoying challenge pages on their Cloudflare Enterprise. They also give you access to way less cores/RAM than and raised prices of other VPS providers more than DigitalOcean, who they were acquired by. They’re still better than most hosts and here are my results migrating from SiteGround to Cloudways, but I pushed them from my 1st to 3rd recommendation for now. They include more storage/bandwidth than and are cheaper, but is faster. RunCloud is another popular alternative.

Yep, these are affiliate links, but I don’t recommend garbage hosts like most affiliates. I’m also open to feedback/questions if you need help: tom(at)

Check my GTmetrix report, PageSpeed Insights, click through my site, or read this Facebook thread. You can search’s TrustPilot profile for “TTFB” to see more migration results.

Siteground to rocket. Net

Rocket. Net trustpilot review

Kinsta to rocket. Net migration

Moved to rocket. Net vs siteground

Rocket. Net positive review

Litespeed cache litespeed server

Rocket. Net woocommerce elementor

Rocket. Net vs cloudways vultr hf trustpilot review

Rocket. Net facebook review 1

Rocket. Net vs kinsta

Kinsta to rocket. Net ttfb redis

Namehero vs siteground feedback

I agree:

Namehero cloudways rocket. Net
NameHero for shared LiteSpeed, Cloudways Vultr HF for cloud, outperforms both


9. Use PHP 8+

Upgrade to PHP 8.0 in your hosting account (if you see errors, revert to PHP 7.4).

Php 8. 0

You should also consider increasing:

  • Memory limit (at least 768MB)
  • Max_execution_time
  • Max_input_time


10. Disable XML-RPC

If you don’t use mobile devices to publish content (or plugins like JetPack), you should disable XML-RPC not only for CPU reasons, but it also stops brute force + DDoS attacks. To disable it, paste the code in .htaccess and replace with your IP address in case you need it. Alternatively, you can disable XML-RPC in Perfmatters or by using the Disable XML-RPC plugin.

# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
allow from

Disable xml rpc 1


11. Clean Up Your Admin

Other than making your admin look tidy, disabling things can save resources too.

Unbloater plugin


12. Stop Using Elementor/Divi

Elementor made improvements with Experiments and Divi released Performance settings.

However, most of these only affect the frontend while the editors still require a decent amount of server resources especially on shared hosting. I moved from Elementor to GeneratePress but Kadence and Oxygen Builder are good too. If you insist on keeping Elementor or Divi, hard code your header, footer, and sidebar in CSS which is more lightweight than heavy page builder code.

Elementor css
Use the coverage tab in Chrome Dev Tools to check “usage visualization”
Fastest wordpress themes
I tested several themes/builders and Elementor/Divi are the slowest by far


13. Disable Unused Hosting Add-Ons

Disabling unused features in your hosting account can also help.

This mainly applies to things like New Relic and xdebug. Just like many diagnostic tools, New Relic has to process a lot of data and should be disabled immediately after you’re done using it.

Cpanel php extensions


14. Keep Email/Web Hosting Separate

There’s a reason many cloud hosts don’t offer email hosting.

Emails take up indoes (files) and resources which could be better dedicated to hosting your website. Some shared hosts have very low inode limits and even say exceeding them can have an “adverse effect on server performance.” Use a third-party service like Google Workspace (what I use) or Cloudflare who started offering free email addresses. It’s a good idea to keep them separate anyway since in case you switch hosts, you don’t have to switch your email too.

Namehero inode limits
Email takes up lots of inodes


15. Block Spam Comments

I recently switched to Antispam Bee (which doesn’t use CAPTCHA) ever since Akismet turned into a paid plugin. Otherwise my blog gets too much spam which isn’t good for CPU or my time.

Antispam bee plugin


16. Run A Malware Scan

Run a scan using Wordfence or another security plugin to check for malware and other vulnerabilities. Fixing other issues can improve security and may also help reduce CPU usage.

A lot of people have success using Wordfence to reduce CPU, but you’ll probably have to configure quite a few settings or the ongoing scans can actually make your problem worse.

Run wordfence scan



How do I reduce CPU usage in WordPress?

The easiest way to reduce CPU usage is by limiting preloading in cache plugins, disabling high CPU plugins/modules, and using Cloudflare to offload bandwidth while using bot fight mode, crawler hints, and hotlink protection.

What happens if CPU usage is 100%?

If your CPU usage is 100%, ask your host to spare temporary resources so you have time to optimize your website. You may be able to lower usage so you don't have to upgrade plans.

How do I check CPU usage?

Your hosting dashboard should have tools to check CPU usage as well as memory, bandwidth, and disk space. Or use tools like AWStats, Query Monitor, and New Relic.

I know this can be a pain so feel free to drop a comment if you need help.


You Might Also Like:


  1. You should also include the WP-CLI cron jobs, for the hosting that support WP-cli.

    wp cron even run –due-now

    Thanks for the great article.

  2. Hi Tom,

    Thanks for the writeup, was and excellent read with loads of information.

    Appreciate you taking the time to share your knowledge.
    Have a good one. Cheers.

    • Not using it myself but I know it comes highly recommended. Very good, lightweight. Lots of people use it like Adam from WPCrafter.

  3. I’d steer away from Siteground. They notified us of going over the CPU limit today, and at the same time took our site down. So we’re scrambling to fix a complex issue while our business is being harmed. I feel like I’m being mugged at gunpoint right now.

  4. Great tutorial. I took your recommendation and went to Siteground (through your affiliate link), and now I’m about to go to Cloudways (DigitalOcean) through your link. I was seeing 90 on GTmetrix on my site hosted at Siteground, but since a few weeks, it has gone very low around 30-40. Don’t know what’s the problem.
    Switched Extra theme to GeneratePress, used Perfmatters, WpRocket and removed most unimportant plugins, but it only increased my scores to 54 Structure and 75 Performance. Can’t find a way to increase it… Maybe moving to Cloudways will help.
    And I noticed that GTmetrix’s interface changed recently… Have any details changed? What’s your thought on this?
    Thanks for reading my comment and for providing honest suggestions. You’ve been a big help!

    • Hey Faiz,

      Thanks so much for using them, been hard to stay on top of the industry with so many changes going on. Yes, GTmetrix updated to include Lighthouse recommendations. Sites using page builders in particular seemed to have gotten punished because of extra CSS/JS. I’m in the process of removing my page builder, should have never used one. Many sites dropped in scores once GTmetrix released this update. Just remember to aim for fast load times instead of scores.

      Regardless, yes, SiteGround’s TTFB has gotten worse and worse. So many complaints about them in Facebook Groups. Cloudways or Gridpane are both good choices and you should see an improvement. If you were using SG Optimizer you will need to replace it (e.g. with WP Rocket).

      Hope that helps :)

      • I recently installed WooCommerce so maybe that was the problem. Still, my other sites without WooCommerce were getting 77 in YSlow so I can say that SiteGround has gotten slow.
        I used your recommendation to get cloudways (through your link obviously) and migrated my site using their plugin. I had some issues with DNS, and their support helped very well. The wait time was extremely short. Then I installed SSL and was getting a B, so I contacted support and they helped me resolve it and now I’m getting an A.
        After doing all that, I am really surprised to see my GTmetrix scores. It’s an A with 98 performance and 87 structure. And I didn’t do anything except change hosting. Thanks a lot for your recommendation. Here’s a link if you want to check it out yourself. Link

        • Wow, that’s pretty amazing. It’s good to see hosting is actually influencing the scores now instead of just load times. Excellent report!

  5. 1) Do not use wordpress, especially for anything else than a basic blog. Their database design is flexible but terrible when it comes to scaling. I’ve reduced the size of the database by a factor of over 10 several times by migrating the sites to custom apps w/ proper database designs. I’m especially looking at you, people that want to start an ecommerce on wordpress…. Not a great idea, especially if you plan on actually growing past the small fish scale.


Leave a Comment