If you're experiencing a 100% CPU usage on your Cloudways server, there are several solutions available to resolve the issue.
Cloudways is a widely used managed Cloud hosting platform that operates on five different cloud providers. The plans offered by Cloudways come with fixed CPU cores based on the selected plan.
There can be various reasons behind the high CPU usage on a Cloudways server, which can ultimately lead to slow website performance.
This guide will provide you with several options to effectively address the problem of high CPU usage on your Cloudways server.
- How to Fix Cloudways CPU Usage 100
How to Fix Cloudways CPU Usage 100
1. Check For Server Overload Issue
Before implementing any optimization techniques, it's crucial to evaluate your Cloudways server's current load and determine whether it's overloaded. High-traffic sites can cause server overload, leading to 100% CPU usage.
To address this issue, it's recommended to analyze the traffic of your existing sites and determine whether your server can handle the growing traffic.
If you determine that traffic is the issue, consider moving your high-traffic sites to a new server with better specifications.
If traffic is not the issue, proceed with the below steps to resolve the high CPU usage problem.
2. Move to CPU Free Auto Scalable Hosting
Cloudways servers typically operate on VPS hosting with fixed CPU cores and RAM server resources.
This means that CPU resources are shared between multiple accounts on the same server, and there are no dedicated CPU resources available.
If your site experiences high traffic that requires additional CPU server resources, Cloudways cannot auto-scale due to the fixed CPU cores on all plans.
As a result, the fixed CPU core processor may reach 100%, resulting in a slow-loading website, often makes Google difficult to crawl your website and leading to a potential revenue loss.
To address this issue, consider moving to a CPU-free auto-scalable WordPress hosting plan.
Unfortunately, Cloudways does not offer such a plan. However, you may want to consider hosting providers such as Nexcess ($19/month) or Rocket.net ($25/month).
For instance, my 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 primary site experiences 100% CPU usage, settling for a temporary solution may not be the best option.
Instead, consider moving to a CPU-free hosting provider to get a permanent solution for high-traffic sites.
3. Upgrade to a higher Cloudways Plan
Another effective solution to fix Cloudways CPU usage at 100% is to upgrade to a higher Cloudways plan. You can choose between Digital Ocean or Vultr and recheck the CPU usage.
Cloudways recommends a minimum of 2 Core Processor plans to avoid CPU usage issues.
If your WordPress site setup is not the problem, upgrading to a higher plan can help address the high CPU usage.
If you're still experiencing the issue, consider the following recommendations to resolve the problem.
4. Remove CPU-Intensive WordPress Plugins
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.
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.
To find out if your plugins are causing this issue, open any page on your site, right-click on Chrome, and open Inspect. Head to the Network tab and check for /admin-ajax/.
One site uses the “Post Views” plugin and sends additional PHP requests. You can find and remove such plugins.
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 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 to clean 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. */”
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.
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.
Although there are many CPU optimization techniques available, they may not be super helpful for sites hosted on Cloudways. Therefore, it's recommended to implement the above practices for fixing the high CPU usage issue.