Background
You should know that WordPress cron differs from real cron. This means that these scheduled tasks (also known as “cron jobs“) will only fire if there is a page load event in WordPress. These page load events usually come from your website visitors.
Therefore, if your site does not have visitors, no one triggers WordPress cron, and your WordPress scheduled tasks (including Prime Mover automatic backups) will never be executed. Or, if you have very few website visitors (common in very new sites), your scheduled tasks will execute late, and task execution will be prolonged.
This tutorial will illustrate a solution to this issue using an external cron service.
Disable WP Cron
Before you can use external cron service – you need to disable WP CRON by adding this constant to your wp-config.php
:
define( 'DISABLE_WP_CRON', true );
This tells WordPress to turn off the native WordPress cron so you can delegate the cron calls to an external service. If you don’t add the above constant, WordPress cron will fire scheduled tasks on page load by default. This is redundant since you now call the cron script via an external service. Adding that constant will improve your site’s performance, so you are removing that redundant execution.
For more details on this topic – please check out this official documentation from the WordPress cron handbook.
External cron service requisite
If you want to rely on an external cron service – your site must be publicly accessible via the Internet. This means that when an external script calls the WordPress cron script – it should not be blocked in any way.
This is not a problem if your site is hosted correctly (like in popular hosting platforms) and you are sure that your site has public DNS. But this is a problem if your site is private and only accessible to you or to selected visitors. Common examples include sites in the local environment (such as on your laptop) or sites within the intranet network (such as your company network, which is not exposed to the Internet).
If so, you cannot enable or use the external cron service. Instead, you should use the native system cron solution your hosting provides.
Enabling external cron service
External cron service works by pinging your website (just like having a website visitor) – but the difference is that this will only call the WordPress cron script (wp-cron.php
). These calls are made on a scheduled basis. It could be every 5 or 30 minutes, and so on.
In this tutorial, we will use cron-job.org, a free service. You can also choose another similar paid service.
- Create an account in cron-job.org.
- Create a cron job with a specific interval. Supposing you want to call the WordPress cron script every two minutes, this will be the setting:
- Finally, save it, and then every two minutes – this web service will call your site WordPress cron script. Make sure to provide the correct cron URL of your site.
Easy, right? This free service includes statistics, logs, and history to see whether your external cron calls are running smoothly or have issues.
What to expect from this?
As long as the external cron service runs fine and does not return errors (as you can see in the logs), it should be guaranteed to run at your specified intervals. This will ensure that your scheduled tasks are completed and that you do not always wait in the queue for a website visitor (just as they were initially or by default).
All your cron tasks should run according to schedule. This includes all cron jobs added by plugins like WooCommerce and the Prime Mover PRO automatic backup feature (if you enable it).
Multisite tips
If you enable automatic backup in a multisite and want to execute auto-backup for any subsites (including the main site), use only the main site URL as part of your CRON URL when calling the script via an external service. You don’t need to add all the URLs for your subsites to the external cron service.
For example – suppose you have a multisite with the following sites (sub-folder configuration):
- Main site URL: https://mydomain.tld/
- 1st subsite: https://mydomain.tld/first-subsite/
- 2nd subsite: https://mydomain.tld/second-subsite/
Then you should have the CRON URL based on your main site URL, e.g.
https://mydomain.tld/wp-cron.php
Use that CRON URL to configure your external cron service (e.g., in cron-job.org). This will ensure that only the main site cron fires, which the automatic backup functionality uses to analyze the firing sequence for all your subsite’s automatic backup schedules.
If you have a multisite with domain mapping functionality or are configured using a subdomain, always use only the main site CRON URL. For example (domain-mapped or subdomain multisite configuration):
- Main site URL: https://mytestdomain.tld/
- 1st subsite: https://anothergreatdomain.tld/
- 2nd subsite: https://awesome-domain.tld/
Then you should have the CRON URL based on your main site URL, e.g.
https://mytestdomain.tld/wp-cron.php
In any multisite – identifying the main site URL is easy regardless of whether you are using mapped domains/subdomains or using folder structure. Just log in as network administrator and go to Network admin -> Sites. WordPress labels your main site with “–Main,” just like in the screenshot below:
Last updated: January 11, 2025