How To Fix High CPU Usage In WordPress Before It Hits 100% (Usually Happens On Apache Servers — Use LiteSpeed Instead)

Reduce cpu usage wordpress

Every time I’ve upgraded my hosting plan from high CPU usage, they used Apache servers.

SiteGround, GoDaddy, Bluehost, and Cloudways use Apache which is less efficient than LiteSpeed. Plus, their plans don’t include a lot of CPU cores. I’ve personally had to upgrade from SiteGround’s GrowBig plan to their $120/mo cloud hosting to fix CPU issues. Instead of wasting money (and hours optimizing my WordPress site when it was my host), all I had to do was switch to a (faster) host who uses LiteSpeed servers with more CPU cores, like ChemiCloud.

Sometimes, high CPU usage is caused by factors outside of hosting such as plugins, bots, background tasks, and more traffic. Before blaming your host, make sure it’s not a bottleneck and spend some time configuring your plugins, CDN, and hosting. But if nothing works, don’t get fooled by your host. If you (or them) are able to fix it, great! But if they tell you to upgrade, look into moving to LiteSpeed before pulling the trigger on a hosting plan that still uses Apache.


1. Use A LiteSpeed Host With More CPU Cores

Just by switching to LiteSpeed, people have seen a 75%+ reduction in CPU usage. LiteSpeed uses CPU/memory more efficiently, it’s faster, and can handle more traffic compared to Apache.

Litespeed apache cpu usage

Litespeed vs apache cpu usage

When choosing any host, I like to look at:

  • Do they use LiteSpeed or Apache?
  • Do they use NVMe storage which is faster than SATA?
  • Do they use MariaDB which has advantages over MySQL?
  • Do they have scam reports like Hostinger and GreenGeeks?
  • If you also use them for email hosting, you’ll want more inodes.
  • Complaints on TrustPilot about specific issues like high CPU usage.

Taking all this into consideration, this is why I like ChemiCloud. They use LiteSpeed, NVMe, MariaDB, and have a 5/5 star TrustPilot rating. Not only do they include more CPU cores + RAM than most hosts, but they offer a Turbo+ Boost add-on which lets you scale cores + RAM from 3/3 to 6/6. Which means even if you need to upgrade, you can just buy this add-on instead of an entirely new plan. You’re not stuck with the same resources since their add-on offers scalability.

SiteGround GrowBig Plan GoDaddy Managed WP Deluxe Plan Bluehost Choice Plus Plan Hostinger Business WP Plan ChemiCloud WP Turbo Plan
Server Apache + Nginx Apache + Nginx Apache + Nginx LiteSpeed LiteSpeed
Cores/RAM Not listed 2 cores/1GB Not listed 2 cores/1.5GB 3 cores/3GB – scalable to 6/6
Storage 20GB SATA “200GB” SATA 60GB SATA 40GB SATA 40GB NVMe – 10/11 locations
Database MySQL MySQL MySQL MariaDB MariaDB
Object cache Memcached x x Memcached Redis
OPcache x
Inodes 400,000 250,000 200,000 600,000 500,000
Data centers 10 9 6 8 11
Major incidents TTFB, DNS, CPU issues, controls FB groups Malware, several data breaches Claims of hosting terrorist sites Downtimes, fake reviews, scams, bad poll None
Migrations $30/site Paid Free on qualified accounts only Unlimited free (but screws it up) 200 cPanel + 10 non-cPanel
CDN SiteGround CDN GoDaddy CDN Cloudflare free
Full page caching x x
DNS Internal (previous issues) Internal Internal Use QUIC’s Use QUIC’s
Cache plugin SG Optimizer (view chart) x x LiteSpeed Cache LiteSpeed Cache
Control Panel Site Tools hPanel cPanel cPanel cPanel
TrustPilot rating 4.8/5 4.7/5 4.2/5 4.6/5 (fake) 5/5
Intro price $3.99/mo $10.49 $5.45 $3.99/mo $5.99/mo
Renewal price $24.99/mo $14.99/mo $19.99/mo $14.99/mo $19.95/mo
Price for 3 years $659.64 $359.64 $304.08 $299.40 $215.64

Litespeed vs nginx vs apache

Which web server do you use recommendLitespeed cache litespeed serverLitespeed litespeed cache quic. CloudLitespeed pagespeed scoresChemicloud gtmetrix report

Which web server do you useLitespeed on litespeed serverLitespeed cache vs. Wp rocketDivi litespeedChemicloud vs sitegroundChemicloud pro feedbackChemicloud speed ui supportSiteground vs chemicloud comparison

Chemicloud trustpilot

For cloud hosting, I either recommend (what I use) or Vultr High Frequency on RunCloud (for only a few sites) or GridPane (for agencies). RunCloud and GridPane both use LiteSpeed. And while still uses Apache, their specs will greatly outperform similar cloud hosts like SiteGround Cloud, Cloudways, and Kinsta. Especially between their <100ms average global TTFB on Cloudflare Enterprise and 32 CPU cores + 128GB RAM. ChemiCloud also has VPS LiteSpeed hosting but you’ll need to spend an extra $9.95/mo for the LiteSpeed add-on.

Rocket. Net vs cloudways cpu usage

Rocket. Net 100ms global ttfb averages a <100ms global TTFB (feel free to test mine) and includes 32 CPU cores on all plans

Hosts like SiteGround, Bluehost, and Hostinger are only popular because of marketing and affiliates who don’t know what they’re talking about. But if you look at specs of their hardware, software, CDN, and cache plugin, hosts like ChemiCloud and are clearly better/faster.

Siteground cpu dance your fault

Siteground cloud cpu limits

Siteground cpu wordfence


2. Remove Resource Hungry Plugins

Some plugins run background tasks which increase CPU usage.

Any plugin (or plugin setting) 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 left by old plugins as well as other database junk. The image below shows how using many Rank Math modules can add lots of overhead.

See my 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


3. Limit Heartbeat, Autosaves, Post Revisions, XML-RPC

These are more background tasks you can limit. WordPress Heartbeat runs every 15-60s, autosaves run every 60s while editing, and a revision is stored whenever you update a post.

I recommend FlyingPress’ bloat settings for this which is also the cache plugin I recommend. They recently released these settings to limit Heartbeat, post revisions, disable XML-RPC, and disable wp-cron (all of which reduce CPU usage). If you’re not using FlyingPress, you can also use the Perfmatters general settings or Unbloater for most of these, but try to use FlyingPress.

Flyingpress bloat settings 2

Limit Heartbeat – if you have the option to disable it in specific areas, I would disable it in the frontend/dashboard, then limit the post editor to 120s since you probably want it there when using page builders, for autosaves, etc. Or paste the code to functions.php after the <?php tag.

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

Increase autosave interval – I increased this to 120s (you could even do 300s). If you’re not using a plugin that lets you do this, you can add the following code to your wp-config.php file.

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

Limit post revisions – since you want a few backups, limit your post revisions to around 5-10.

define( 'WP_POST_REVISIONS', 10 );

Disable XML-RPC – If you don’t use mobile devices to publish content (or use plugins like JetPack), disable XML-RPC. Aside from reducing CPU usage, it also stops brute force + DDoS attacks. If you’re not using a plugin that does this, use Perfmatters, Disable XML-RPC plugin, or paste the code to .htaccess and replace with your IP address in case you need it.

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


4. 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.

The first step is disabling the built-in wp-cron in FlyingPress (see previous section) or 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.


5. Use A CDN With Full Page Caching

CDNs lighten the load on your server by offloading bandwidth to their data centers.

Cloudflare bandwidth

With full page caching, you’re caching HTML which improves TTFB in multiple global locations (which you can test in KeyCDN) while also reducing CPU usage. If you’re using LiteSpeed, you’ll want to use (ideally their paid/standard plan which uses all 83+ PoPs and includes DDoS protection). If you’re not using LiteSpeed, use Cloudflare APO. I don’t recommend using SiteGround’s CDN or WP Rocket’s RocketCDN since they either don’t support full page caching or have a history of DNS issues which already caused 2 million sites to get blocked from Google.

Of course, the best CDN right now is’s Cloudflare Enterprise which is free, setup automatically, and includes more Enterprise features than Cloudways/Kinsta like APO, Argo Smart Routing, WAF, and image optimization. Plus, their hosting is faster than both of these.


6. Use Your CDN For Firewall + Image Optimization

Using your CDN for security + image optimization also lightens the load on your server. Whereas security + image optimization plugins use resources and increase CPU usage.

A firewall blocks unwanted requests. Cloudflare (WAF),, and BunnyCDN all have firewalls. Cloudflare lets you add firewall rules to block bad bots, hackiest countries, etc. They also have rate limiting (paid service) to identify and mitigate excessive requests to specific URLs.

Cloudflare hotlink protection firewall events
See what’s getting blocked in Cloudflare’s firewall events (most of mine are from image hotlinking)

For image optimization, I recommend either, Cloudflare Mirage/Polish (included with’s and Cloudways’ Cloudflare Enterprise or on Cloudflare Pro), or BunnyCDN’s Bunny Optimizer. These also typically optimize your images better than plugins (like Imagify).

Bunny optimizer


7. Block Bad Bots

Hosting companies love to blame high CPU usage on bad bots.

You can use Wordfence’s traffic report to see all bots hitting your site in real-time. But I recommend deleting Wordfence when you’re done since the plugin can increase CPU usage.

Wordfence live traffic report

Instead, enable Cloudflare’s bot fight mode.

Cloudflare bot fight mode

Additionally, crawler hints save resources by helping search engines avoid wasteful crawls.

Cloudflare crawler hints


8. Increase Cache Expiration

Some cache plugins, hosting dashboards, and CDNs have a cache expiration setting.

A longer cache expiration has several benefits, one of them being less CPU usage because the cache doesn’t need to rebuild as frequently. Google recommends setting this to 365 days for static files, but dynamic websites like WooCommerce should generally aim for about 1 month.

Cloudways static cache expiry


9. Protect The WP-Login Page

Your wp-login page is a common target for bots/attackers. Even just attempting to login generates additional requests to your server, so it’s best to try and block these completely.

Do not move your wp-login page when using’s CDN (for LiteSpeed) since it already protects the wp-login page. However, you’ll want to move it in most other cases.

  • Limit login attempts: control how many times users attempt to login, lockout period, XML-RPC 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.
  • 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


10. Try Switching Cache Plugins

FlyingPress + LiteSpeed Cache address web vitals better than WP Rocket + SG Optimizer. If you’re using a LiteSpeed server, use LiteSpeed Cache. If not, use FlyingPress in all other cases.

SG Optimizer WP Rocket FlyingPress LiteSpeed Cache
Server-side caching x x
Object cache integration x x
Delay JavaScript x
Remove unused CSS x Inline Separate file Separate file
Critical CSS x
Preload critical images x x x
Exclude above the fold images By class/type By URL/class Automatic Automatic
Lazy load background images x Inline HTML lazy-bg class x
Add missing image dimensions x
Lazy load iframes x
YouTube iframe preview image x
Self-host YouTube placeholder x x x
Host fonts locally x x
Font-display: swap x
Preload links x
Bloat removal (beyond Heartbeat) x x (details) x
Lazy render HTML elements x x
Guest Mode x x x
Advanced cache control x x x
Gravatar cache x x x
Limit post revisions Delete all Delete all Keep some Keep some
CDN Google Cloud StackPath BunnyCDN
CDN PoPs 176 73 114 81
Full page caching x x
CDN geo-replication x x x
CDN image optimization x x
CDN image resizing for mobile x x x
CDN DDoS protection x x
CDN bandwidth Unmetered Very limited Usage-based Usage-based
Documented APO compatibility x x x
Documentation Not detailed Good Not detailed Good
New features Infrequent Infrequent Frequent Frequent
Facebook group Join Join Join Join
CDN price $14.99/mo $8.99/mo $.03/GB $.02-.08/GB
Plugin price Free $59/year $60/year Free
Renewal price Free $59/year $42/year Free

I’ve seen several complaints in Facebook groups about WP Rocket and CPU issues. FlyingPress also recently released this update to reduce CPU usage by 300% when the cache is preloading.

Flyingpress cpu usage reduction


11. Limit Preloading + Cache Clearing In Cache Plugins

Preloading is a big reason cache plugins can increase CPU usage. Some cache plugins let you change how preloading works while other plugins don’t (in this case, try disabling preloading).


You should only preload important sitemap URLs. Preloading the entire sitemap means tags and other non-critical pages will be preloaded and use 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 quicker 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 your 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.


12. Clean Your Database (Thoroughly)

I briefly covered this in step 2, but cleaning your database can reduce CPU usage.

Cache plugins clean most of it, but WP-Optimize lets you delete tables left behind by old plugins. In the process of doing this, you can also see specific plugins/modules adding overhead. In which case, consider disabling these modules unless you actually need them.

Rank math database bloat


13. Install Redis Or Memcached With OPcache

Your host will either support Redis, Memcached, or neither (find their instructions).

You’ll usually activate it in your hosting account (PHP Extensions in cPanel). Next, use a plugin (like LiteSpeed Cache’s object cache settings) to connect it. If your host doesn’t support object cache, use the Docket Cache plugin. OPcache can usually be enabled in your hosting account.

Opcache memcached redis


14. Avoid Page Builders On Cheap Hosting

Why does Elementor recommend a 756MB memory limit? Because it requires more resources than Gutenberg and other lightweight alternatives (plus it adds extra CSS/JS to the frontend).

When you combine a page builder that requires more server resources with a hosting plan that doesn’t give you enough… you get higher CPU usage. The same is true for WooCommerce sites.

Elementor memory limit


15. Use PHP 8+

Upgrade to the latest PHP version in your hosting account (if you see errors, just revert back). Higher PHP versions are faster on the frontend and more efficient for CPU and memory usage.

Php 8. 1


16. Clean Up Your Admin

Other than making your admin look tidy, disabling things can save resources. Try one of these:

Unbloater plugin


17. 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


18. Keep Email/Web Hosting Separate

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

Emails take up inodes (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 (make sure your plan has enough)


19. 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


20. 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?

Switching to LiteSpeed hosting with more CPU cores can often reduce WordPress CPU usage by 50%+. Also check for resource hungry plugins, background tasks, and offload everything possible to your CDN (including bandwidth, security, and image optimization).

What can I do if WordPress 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.

Which plugins reduce WordPress CPU usage?

FlyingPress, Perfmatters, Unbloater, WP-Optimize, Blackhole for Bad Bots, and WPS Hide Login are all WordPress plugins that include features for reducing CPU usage in WordPress.

Do Apache servers cause high CPU usage in WordPress?

Yes, Apache servers are inefficient compared to Nginx and LiteSpeed. For example, LiteSpeed can handle 2x the capacity of Apache and uses resources more efficiently.

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


You Might Also Like:


  1. Hi Tom,

    Your guide is a benediction. We are strongly considering changing the host of our business website based on your recommendations. We use Cloudways but experience constant CPU spikes for no apparent reason. Their support is very kind, but unable to find the cause.

    • Hey Alex,

      It’s pretty common on Cloudways since they don’t give you a lot of cores/RAM for the price (it’s marked up about 2x as the price of actual cloud provider), Apache servers, etc. May want to look into another service where you can launch cloud servers like RunCloud or ServerAvatar, or give a spin if the bandwidth is in your budget. But yeah, I see a lot of Cloudways users post about CPU usage in FB groups.

  2. 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.

  3. 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.

  4. 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.

  5. 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!

  6. 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