What if WordPress wp-cron isn’t working?

WordPress and many of its plugins need to wake up and do some work for example to shedule posts, maintenance, refresh caching and so on.
Normally it does this while a visitor or searchengine requests a page and this slows down this user or searchengine which leads to suboptimal expirience or downgrades on the ranking.

So many people disable this behavior and run a linux sheduler (cronjob) to call the wp-cron.php file by themself over HTTP.To disable it open the file wp-config.php and add this to it:
define(‘DISABLE_WP_CRON’, true);

Now normally they now run a cronjob that loads this page:

This doesn’t seem to work and the wordpress maintenance stops.

What i’ve found is, that you’re able instead of receiving the page, simply calling the php script wp-cron.php by yourself in a cronjob:

cron in unix every 5 minutes:
*/5 * * * *
/usr/bin/php  /path_to_your_php_file/wp-cron.php

or on plesk (replace the 7.1 with your php version)
/opt/plesk/php/7.1/bin/php /var/www/vhosts/MYDOMAIN.com/httpdocs/wp-cron.php

The first time you do this it will take a long time as WordPress queues more and more jobs and the list gets longer and longer over all the years and needs to be worked on until all jobs are done…