How to Fix Cloudways CPU Usage 100%
Cloudways Flexible hosting services on Digital Ocean, Vultr, or Linode often lead to 100% CPU usage because those plans come with fixed CPU resources, which can’t be expanded further.
When your CPU hits 100%, all the sites hosted on your server will behave slowly, leading to high TTFB and 5xx errors.
This guide provides you with 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
Before implementing any optimization techniques, it’s crucial to evaluate your Cloudways server’s current load and find whether it’s overloaded.
High-traffic sites can cause server overload, leading to 100% CPU usage.
![](https://hostingstep.com/wp-content/uploads/2023/01/Cloudways-CPU-.png)
To solve this problem, it’s advisable to examine the traffic on your current websites and determine if your server can handle the increased traffic.
If traffic is causing the problem, you may want to transfer your high-traffic websites to a server with high CPU resources.
If traffic is not causing the issue, follow the steps below to address the high CPU usage problem.
NEW: Optimize Cloudways Cron
According to the new input from Cloudways, the sudden rise in 100% CPU usage is due to the multiple crons running at the same time.
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
Cloudways comes with a VPS architecture, which means it has a fixed number of CPU and RAM. Due to this reason, Cloudways can’t auto-scale when your server needs additional CPU resources for time being.
As a result, the server overloads, making all your sites in the Cloudways application load slower.
One of the solutions is to move your sites to a CPU-free auto-scalable WordPress hosting plan.
Some of the best options, with respect to, Cloudways, are Nexcess and Rocket.net.
Nexcess site hosted on a $19/month plan has 32 CPU cores, and the real-time CPU load is 0%.
Similarly, my Rocket site hosted on a $30/month plan has 16 CPU cores, and the real-time CPU load is 0%.
If your website is experiencing 100% CPU usage, opting for a temporary solution may not be the most effective choice.
It would be better to switch to a CPU-free hosting provider for a permanent solution that can handle high-traffic sites.
3. Upgrade to a higher Cloudways Plan
If you’re experiencing high CPU usage on Cloudways, upgrading to a higher plan like Digital Ocean or Vultr can be an effective solution.
Cloudways suggests opting for a minimum of 2 Core Processor plans to avoid this issue.
If your WordPress site setup is not the cause of the problem, upgrading to a higher plan can help alleviate the high CPU usage.
If the issue persists, try implementing the following recommendations to resolve the problem.
4. Find Script The Causes High CPU Usage
The WordPress plugins are the root cause of many issues, including high CPU usage.
There are two options to identify the high CPU-causing WordPress plugins.
- First, use the query monitor plugin.
- Second, using Chrome browser.
Query Monitor plugin helps to debug database queries, PHP errors, etc. Install and activate the plugin to see a Query Monitor Tab at the bottom of your WordPress admin panel.
Open Query Monitor -> Queries -> Queries by Component. Sort the Time column and disable or remove the plugins, which takes time.
5. Remove Unoptimized WordPress plugins using Chrome:
The unoptimized plugins send a non-cacheable request processed by PHP. The more uncacheable requests, the higher CPU usage will be higher.
If you’re experiencing website issues, you can check if your plugins are the culprit by opening any page on your site, right-clicking on Chrome, and selecting 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.
5. Use Cloudflare CDN to Offload Server Resources
Cloudflare CDN is an excellent example of the term “great things come for free.” Configure your site with a Cloudflare free plan and offload your website content to Cloudflare’s 200+ global data centers.
Through this process, only the uncached pages will be delivered through your Cloudways servers, while 99.9% of requests will be processed through Cloudflare.
You can offload static resources like CSS, JS, and images on Cloudflare or the entire HTML pages. I recommend the second option for the best results.
This step significantly reduces the server CPU usage.
Cloudways offers a Cloudflare Enterprise add-on for $4.99/month, which can be activated with a few clicks.
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 does a detailed cleanup. Whatever plugin you’re trying, don’t forget to back up your site before doing this step.
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, based on your site traffic, the WP-Cron makes your site slow down and causes 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.
8. Optimize Images
To reduce the Cloudways CPU usage from 100%, it’s essential to compress and optimize the site’s image for quicker delivery.
The size and quality of the image are the major factors that cause high load time, eventually landing in high CPU usage.
ShortPixel is the best free image optimization plugin to compress the size and quality of the image. Get started with the default settings and move to the “Bulk ShortPixel” option to optimize existing images.
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, as it includes performance improvements that can minimize load time and maximize efficiency.
LMS like LearnDash requires auto-scalable Managed Fastest WordPress hosting services like WP Engine. Shared Web hosting and VPS providers like Cloudways hosting are not suitable for hosting LMS services.
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.
You can use the htop command to view CPU usage statistics and the Cloudways server monitoring feature to track RAM usage over time.
Conclusion
In summary, there are various techniques available to reduce Cloudways high CPU usage by 100%.
Moving high-traffic sites to a new server, upgrading to a higher Cloudways plan, and considering CPU-free auto-scalable hosting plans are some of the effective solutions to address the problem.
Cloudways Autoscale is a good option, but it’s readily available now. Once it goes out of beta, I’ll test them and update my Cloudways Review for your reference.
Although many CPU optimization techniques are available, they may not be super helpful for sites hosted on Cloudways.
Therefore, it’s recommended that the above practices be implemented to fix the high CPU usage issue.