Woman Working on a Server
Hero Section Background

How to replace WordPress cron with real cron jobs on Plesk

The following is a step-by-step guide to replacing WordPress cron jobs on Plesk. When you have finished, WordPress scheduled actions will run reliably and efficently thanks to being triggered by a real server cron job.

By default, WordPress cron relies on someone visiting the site to be triggered. As such, scheduled actions only run if the site has traffic. The flip side of this is that it runs every time a visitor hits the site.

Disable default WordPress cron

Before setting up the server to run the scheduled actions, we need to stop WordPress’ default cron system. We do this by defining DISABLE_WP_CRON as TRUE in our wp-config.php file.

Step 1

Log in to your Plesk admin panel and go to the site you want to setup real cron for.

Step 2

Go to the File Manager and navigate to the site’s root directory that has wp-config.php in it and open the file.

Click the link to get to the File Manager & wp-config.php

Step 3

Open up the file wp-config.php in the File Manager to make the alterations.

File Manager wp-config Highlight

Below the line that says

define('WP_DEBUG', FALSE);

Add the following PHP code snippet

define('DISABLE_WP_CRON', true);

So your wp-config.php looks like

define('WP_DEBUG', FALSE);

define('DISABLE_WP_CRON', true);

WordPress cron will no longer try to trigger the scheduled actions list when visitors are active on the site. We can instead configure our Plesk server to do this for us.

Setup Plesk to trigger WordPress cron jobs

Now we can give our Plesk server the duties of running the WordPress scheduled actions.

The process to getting Plesk to run WordPress cron jobs is quite simple and it’s a single command in Plesk’s scheduled tasks system.

Step 1

Go back to your domain’s main control panel in Plesk. In the sidebar, look for the Scheduled Tasks link and go to it.

Plesk Scheduled Tasks Link Location

Step 2

Click Add Task. This will open up the Scheduled Tasks control panel where we will create our cron job.

Step 3

Fill in the form with the following settings

Task Type Select Run a command
Commandwget -q -O – http(s)://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

RunSelect Cron Style from the drop down and then enter * * * * *
DescriptionMemorable name for the cron job, specific to your domain.
NotifyIt’s always a good idea to select the Errors Only option so you’re made aware of any issues in running the cron job
Example WordPress Cron jobs on Plesk

Step 4

Click OK and make sure it saves correctly. The Plesk Scheduled Task will now appear in the domain’s and server’s lists of scheduled tasks.

Testing Plesk is running WordPress Cron Jobs

So, now you’ve got Plesk setup you need to see if it’s working right? To do so, we can use the awesome Advanced Cron Manager – debug & control plugin. It’s free and on the WordPress Plugin repo so all you need to do is add it to your site from the WordPress admin area.

Upon installation, open the Tools menu and navigate to Cron Manager. You’ll be presented with a list of all the scheduled actions for your site and when they’re going to run.

Now, sit back and relax while we wait for the next action to run. If it moves off the top of the list at the time it’s meant to run…everything is working!

That’s it!!! You have successfully replaced WordPress cron jobs with Plesk cron jobs that trigger WordPress scheduled actions.

Need some help setting things up? We’d be more than happy to help. Just drop us a message via the form below.

Get In Touch

Please submit your query & a consultant will get back to you.

Please make sure all required fields are completed.



Thanks for your message

A consultant will contact you shortly!

or call 01905 570735

Related Articles

A busy press conference
06 Apr 2020

From the CEO: Announcing our C-19 Response Package

When the government announced it was closing the high-street I, GloboTek CEO Matt Campbell, started to think about what we […]

Move your business online banner
26 Mar 2020

Reacting to COVID-19: Move your business online

Literally overnight, the retail industry in the UK has been forced to close. With traditional bricks & mortar stores no […]

Discussion over a pie chart
16 Aug 2019

Digital Marketing for Zoos White Paper

Today, we would like to announce we are producing a white paper on Digital Marketing for Zoos. Our objective is […]