Matomo Analytics

Each time a user runs your WordPress application by visiting it, or viewing posts/blogs WordPress goes to work to see if there are any jobs open to run them.

For a starting or smaller WordPress website this is no problem, but it is not optimized at all; lets change this ?

First of we will need to tell WordPress that we don't want the users to be responsible to check if there are jobs open to be processed. (What we explained above)
We do so by adding this line of code to the wp-config.php file:

define('DISABLE_WP_CRON', true);

Now add your own cronjob to execute the WordPress cron script to run so about each 5 or 10 minutes, this should be enough (if its not, then lower it):

php /home/ploi/{domain}/wp-cron.php

Make sure to replace {domain} with your own domain as it displays in your site overview.

Thats it, your WordPress installation will now make sure your users are not responsible for executing the WordPress crons/jobs.

09 December 2018 (last updated 2 years ago)


Back to Optimisations