Articles in this section

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

Plesk for Linux kb: technical ext: wptk ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Production WordPress site contains links to staging site after synchronization of WordPress site via WP Toolkit, going to Domains > staging.example.com > Sync

  • The WordPress staging site has cache plugins and it might have a cache folder like wp-content/cache folder

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:

    mceclip0.png

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

    CONFIG_TEXT: 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

    mceclip1.png

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

    mceclip3.png

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

    CONFIG_TEXT: 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:

    mceclip4.png

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

    mceclip5.png

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.