Resource Usage: overload caused by Wordpress Cron (site speed optimization)

How to save server resources and avoid "Resource Limit has reached" error

NYhost.net Support

Last Update 3 years ago

Every time visitor access your Wordpress website, wp_cron.php file fires up. If you have few visitors per second, it won't cause any issues. However, if 100 people land on your main page at once, your site will consume a lot of memory (at least 6GB) and CPU.

To prevent unnecessary memory consumption, we do recommend to use Cron built in cPanel. Here is how:

1. Backup following file: wp-config.php then make sure that file has 600 permissions (644 shouldn't be used).

2. Open wp-config.php file either via cPanel file manager or any editor within FTP client (Filezilla). We're using Filezilla with simple Notepad editor.

3. Find following lines inside wp-config.php file:

4. Add one line immediately after "WP_DEBUG line" line so it will look exactly like so:

5. Go back to cPanel then search for "cron". We do recommend to process cron jobs TWO times per day. DO NOT set it "every 5 minutes", "every 30 minutes" etc., it will overload your website!

Add following Cron Job (process every day or two times per day)

That's it!

If you experience any issues right after wp-config.php modification (error 500 etc.), please restore wp-config.php from backup then complete this tutorial again.

Was this article helpful?

2 out of 2 liked this article

Still need help? Message Us