This article explains how to properly set up a real server-side cron job for WordPress on GHFS Hosting using Plesk. WordPress normally uses a built-in system called WP-Cron, but it is not always reliable. Setting up a real cron job ensures scheduled tasks run correctly.
1. What Is WP-Cron?
By default, WordPress uses WP-Cron, which runs only when someone visits your website.
This can cause issues such as:
-
Scheduled posts not publishing
-
Backups not running
-
Plugins not updating
-
High traffic triggering too many cron runs
A real server cron job is more stable and efficient.
2. Step 1: Disable WP-Cron in WordPress
To use a real cron job, first disable the internal WP-Cron.
Steps:
-
Open your website files through Plesk File Manager
-
Edit the file wp-config.php
-
Add the following line above “/* That’s all, stop editing! */”
Save the file.
3. Step 2: Create a Real Cron Job in Plesk
Steps:
-
Log in to your Plesk panel
-
Go to Scheduled Tasks
-
Click Add Task
-
Set Task Type to Run a command
-
In the command field, enter:
Replace yourdomain.com with your actual WordPress site URL.
-
Set Run frequency to:
-
Once per 5 minutes (recommended)
Example schedule:
-
Minute: */5
-
Hour: *
-
Day: *
-
Month: *
-
Weekday: *
-
Save the task.
This command executes WordPress cron automatically every few minutes.
4. Alternative Command (If wget is not available)
Use curl instead:
5. Verifying Cron Is Working
After setting up:
-
Scheduled posts should publish on time
-
Plugins using cron should run correctly
-
Backup plugins work more reliably
You can check logs in Plesk under Scheduled Tasks → Log.
6. Troubleshooting
Cron does not run:
-
Wrong domain added in cron command
-
SSL issue if using https
-
WP-Cron not disabled in wp-config.php
“Permission denied” errors:
-
The cron job path is incorrect
-
Verify hosting permissions
Backup plugins still not running:
-
Plugin may require special configuration
-
Contact support for assistance
7. When to Contact GHFS Hosting Support
Contact support if:
-
The cron job is not running
-
You cannot access or edit wp-config.php
-
You receive persistent errors in the cron log
-
WordPress scheduled tasks still do not run correctly
GHFS Hosting can verify file permissions and cron settings for you.