Plesk

How to enable loopback connections for WordPress cron in Plesk?

Question

How to enable loopback connections for WordPress cron?

Answer

Some WordPress plugins use background processes.

WordPress simulates cron works by having the site connect back to itself via curl (or other available fallback connection methods if curl is unavailable) to trigger actions to take place behind the scene.

Option 1

Connect to the server via SSH for Linux or RDP for Windows and enable loopback by adding the domain to the "hosts" file ( /etc/hosts - for Linux, %SystemRoot%System32driversetchosts - for Windows):

127.0.0.1 www.example.com example.com localhost localhost.localdomain

Option 2

If the first solution does not work, add the code below to wp-config.php:

  1. Log into Plesk

  2. Go to Domains > example.com > File Manager > httpdocs and click on wp-config.php file to edit and add the below string:

    define ('ALTERNATE_WP_CRON', true);