Replacing WordPress Cron Jobs with real Cron Jobs

This guide is written for customers of GoMach5 and CryptoWoo, to show you how to correctly disable and replace WordPress Cron (WP-Cron) with the reliable and efficient cron job provided by us. We will show you how to create cron jobs via DirectAdmin, and we intend to add a section for cPanel at a later date.

Why disable the built in Cron?

To put it simply, we have found over the years that WP-Cron is less reliable than a real cron job and it can impact your page load times. We prefer to utilize the web hosting panel cron job schedulers built into panels such as cPanel or DirectAdmin. However, if you are not using any of these and are using a Linux VPS you can use crontab just as easily.

Disable WordPress Cron

Luckily disabling WordPress Cron is as simple as adding one line of code to your wp-config file. Open up your wp-config.php file with your editor of choice and add the following line somewhere in there.

define('DISABLE_WP_CRON', true); // Disable built in cron jobs

Create a Cron job in DirectAdmin

Log in to your DirectAdmin control panel provided by your web hosting provider and navigate to the Cron Jobs section under the Advanced Features section.

Example of Advanced Features section of DirectAdmin

Once you have entered here you can click Create Cron Job and you will be greeted with the following options:

DirectAdmin Cron Job settings page

The above options will run your cron job once per minute. Please ensure you enter the correct directory that your wp-config.php is located in or else your cronjobs will fail.

/home/accountname/public_html/; /usr/local/bin/php -q wp-cron.php > /dev/null 2>&1

Another option is the following code instead but replace with your own site’s domain.

wget -q -O - >/dev/null 2>&1

Verifying it works

Once you have completed the above steps then we recommend navigating back to your WordPress Control Panel and navigate to CryptoWoo > Database Actions where if it has been set up correctly you should see exchange rates updating properly.

If this tutorial has not worked for you and you are a customer of Go Mach 5 then we encourage you to reach out to our support who will be happy to assist, alternatively, if you are not a customer reach out to your respective hosting provider for assistance.

If you are looking for a compatible hosting provider for CryptoWoo then check out our CryptoWoo Optimized Hosting plans where we guarantee compatibility with our platform. We accept PayPal, as well as Bitcoin, Bitcoin Cash, Ethereum, Litecoin, and many more cryptocurrencies. Use coupon code 20CWCRJBT to save 10% off any of our CryptoWoo Hosting plans.

Leave a comment