Hostingstep is supported by its readers. When you purchase through links on our site, we may earn a commission. Learn More.

How to Fix Cloudways CPU Usage 100%

If you’re using Cloudways with Digital Ocean, Vultr, or Linode, you will experience 100% CPU usage in recent times.

When your CPU hits 100%, all the sites (applications in terms of Cloudways) hosted on your server will behave slowly, leading to high TTFB and 5xx errors.

This guide provides the most logical ways to fix the Cloudways CPU usage hitting 100%.

How to Fix Cloudways 100% CPU Usage

1. Check If Your Cloudways Sever is Overloaded

The first and foremost way to fix your CPU overload issue is to analyze your server specification and see if it can handle all your traffic.

I am saying this because no other optimization will help if your server is overloaded. This happens naturally with most of my Cloudways client sites, as they started with a single site and then added additional sites on the same server as time progressed.

The easiest way to reduce 100% CPU usage is to delete unwanted applications. I’m not perfect, and if you take my 2GB Vultr server, you will see 2-3 applications lying idle that I started as a side project. I deleted those applications and saw a great reduction in my server’s real-time CPU usage.

If you don’t have any such applications, then it’s time to review your active applications and move the high-traffic applications to another server or simply upgrade your existing server to the next plan.

However, if traffic is not an issue, try the latest Cron optimization method suggested by Cloudways itself.

NEW: Optimize Cloudways Cron

According to the new input from Cloudways, the sudden rise in 100% CPU usage is due to multiple Crons running simultaneously.

Head over to your WordPress application -> Monitoring -> Running Crons to access all the Crons on your application.

If you have multiple applications on a single server, go through all the Crons and enable Cron only for required applications.

2. Move to CPU Free Auto Scalable Hosting

Some WordPress sites are funnily dangerous and can swag any number of CPUs thrown at them. In this case, you require a CPU-free auto-scalable solution.

Cloudways flexible hosting plans are simply VPS, which means they have a fixed number of CPU and RAM. Therefore, Cloudways can’t auto-scale when your server needs additional CPU resources for the time being.

As a result, the server overloads, making all your sites in the Cloudways application load slower. One solution is to move your sites to a CPU-free auto-scalable WordPress hosting plan.

Based on our tests, Cloudways Autonomous is a good auto-scalable solution. However, one of the best options is Nexcess.

Nexcess plans are generally auto-scalable, and they come with 32 CPU cores, which can fix your CPU issues on Cloudways. (There is a 60% ongoing discount)

3. Find Scripts That Causes High CPU Usage 

WordPress plugins are the root cause of many issues, including high CPU usage. Two options exist to identify the high CPU-causing WordPress plugins.

  • First, use the query monitor plugin.
  • Second, using Chrome browser.

The Query Monitor plugin helps debug database queries, PHP errors, and more. Activate the plugin to see a Query Monitor Tab at the top of your WordPress admin panel.

Open Query Monitor -> Queries -> Queries by Component. Sort the Time column and disable or remove the plugins that cause huge load time.

5. Remove Unoptimized WordPress plugins using Chrome:

The unoptimized plugins send a non-cacheable request processed by PHP. The more uncacheable requests, the CPU usage will be higher.

Open any page on your site, right-click on Chrome, and select Inspect. 

From there, navigate to the Network tab and look for “/admin-ajax/”. A site using the “Post Views” plugin may send additional PHP requests, which you can remove by identifying and deleting the plugin.

6. Cleanup WordPress Database

The best practice for cleaning up a WordPress database is using WP Rocket or WP-Optimize plugin.

At WP Rocket, Click the “Database” Tab and find the following cleanup options:

  • Post Cleanup
  • Comments Cleanup
  • Transients Cleanup
  • Database Cleanup

Read instructions on each cleanup process and proceed accordingly.

Alternatively, WP-Optimize is a free database optimization plugin that performs a detailed cleanup.

7. Disable WP-Cron

The Cron Jobs perform the scheduled task on your site during a fixed date or time.

WP-Cron is responsible for performing WordPress Cron jobs. However, WP-Cron can slow down your site and cause CPU spikes whenever the WP-Cron job runs on the backend.

Add the following code to your theme’s wp-config.php file. Add the code above the line that says “/* That’s all; stop editing! Happy publishing. */”

define('DISABLE_WP_CRON', true);

Once disabled, you can use the Cloudways System Cron instead of WordPress Cron for faster performance.

special case: Cloudways RAM and CPU Usage High with LearnDash

If you are experiencing high RAM and CPU usage on your Cloudways server while using LearnDash, you can do a few things to address the issue. 

First, make sure you are using the latest version of LearnDash. It includes performance improvements that can minimize load time and maximize efficiency.

LMSs like LearnDash require auto-scalable Managed Fastest WordPress hosting services like Kinsta. Shared Web hosting and VPS providers like Cloudways are unsuitable for hosting LMS services due to limited server resources. 

However, you can also try optimizing your server settings by increasing the RAM or CPU cores on Cloudways or implementing a premium caching plugin like WP Rocket. Additionally, Cloudways offers monitoring tools to help you identify and troubleshoot high RAM and CPU usage issues.

Book a Free Hosting Consultation

Ask us about your hosting needs. We’ll match them to our performance data to find the best hosting for you.

Hostingstep About Us Image

Leave a Reply

Your email address will not be published. Required fields are marked *