Plesk

Production site contains links from staging site after WordPress synchronization via WP Toolkit

Symptoms

Cause

The WordPress cache from the staging site was copied to the production site when the WordPress synchronization was performed via WP Toolkit.

Resolution

Click on a section to expand

Via Plesk GUI

  1. Log in to Plesk GUI

  2. Go to Tools & Settings > Scheduled Tasks > Add Task > Disable Active option > Task type: Run a command > System user: root:

  3. Fill the Command field with the following and click Run Now to get the WordPress instance ID:

    DOMAIN='example.com'; /usr/sbin/plesk ext wp-toolkit --list | egrep $DOMAIN | awk '{print "ID: "$1"nURL: "$8}'

    * Where example.com is the affected domain

  4. If the WordPress instance is handled by WP Toolkit, the task executed will return the ID and the Website URL:

  5. Fill the Command field with the following and click Run Now to clear cache from the WordPress instance:

    ID='4'; /usr/sbin/plesk ext wp-toolkit --clear-cache -instance-id $ID

    * Where 4 is the WordPress ID of the affected instance

  6. Once the WordPress cache will be cleared via WP Toolkit, the following result will be shown:

  7. Click on Cancel to don't save the Scheduled Task:

Via SSH

  1. Connect to the server via SSH

  2. Get the WordPress instance ID of the production site:

    # DOMAIN='example.com'; plesk ext wp-toolkit --list | egrep $DOMAIN | awk '{print "ID: "$1"nURL: "$8}'
    ID: 4
    URL: https://example.com

  3. Clear cache from the WordPress instance with the ID returned in previous step:

    # plesk ext wp-toolkit --clear-cache -instance-id 4