CPU Usage Hike Issues on Wordpress - 100% Working
Developers4u
Posted on September 16, 2020
For Developer, CPU Usage Hike is one of the significant issues webmasters face with shared hosting. Yeah, if using shared hosting for a website that gets 10+ real-time traffics, CPU gets overloaded. This is when the site has more chance of returning a 502 error.
I recently faced the same situation and did all available troubleshooting methods to reduce the CPU usage, but in vain. Finally, I sat on the scholar's table and tried different permutations and combinations and then finally. Eureka. I fixed this pressing issue by myself.
There is a lot of advice/suggestions that are already there on the internet to sussing this issue. Still, most of them end with a recommendation to remove the plugin or check with the theme file or some tweaks in wp-config/PHP files.
Yeah… some of these definitely help, but beyond all these, there is one major fix that not many has explored, especially for WordPress sites hosted in a shared server.
I'm talking about Cron Jobs Controlling techniques. Yes, it may seem a bit complicated because you need to adjust every WP element to get CPU usage under control.
Basically, Corn Jobs is nothing but Scheduling events from WP or any other plugins running in the backend. This is no game for the beginner as these changes can either make or break your website, which means the method is meant only for a skilled and experienced PHP developer.
Defining ('disable-Cron,' true) on the wp-config.php file will activate it. Yes, of course, it works, but what about existing Cron jobs?
First, you have to identify the number of Cron jobs running in the site background and assess each's purpose.
It's certain that you may find a few that are being run or activated for no specific reason. Such Cron jobs have to be identified modified. (Either you can remove it or change the frequency.)
For example, there is one Cron job running twice daily to check WP Version releases. It's important, but it doesn't have to trigger twice a day, right? So, we can change the frequency level to maybe weekly once or monthly twice.
As same can be done for plugin updates. Adjust the pre-set Cron Jobs that is causing unnecessary CPU hike. These are Cron jobs that are majorly affecting the core performance of your server.
You can sense a big change or improvements after these Cron jobs are adjusted or modified.
Mostly Cache plugins/backup plugins/compression plugins/Core WP plugins are the culprits. They have a high number of Scheduled Cron Jobs.
Want help implementing this? Ask me here.
Applied this techniques for my clients site as my friends one, Your Education Portal | Open Education Portal
Posted on September 16, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024
November 30, 2024