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
-
Go to Tools & Settings > Scheduled Tasks > Add Task > Disable Active option > Task type: Run a command > System user: root:
-
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 -
If the WordPress instance is handled by WP Toolkit, the task executed will return the ID and the Website URL:
-
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 -
Once the WordPress cache will be cleared via WP Toolkit, the following result will be shown:
-
Click on Cancel to don't save the Scheduled Task:
-
Connect to the server via SSH
-
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 -
Clear cache from the WordPress instance with the ID returned in previous step:
# plesk ext wp-toolkit --clear-cache -instance-id 4
Comments
0 comments
Please sign in to leave a comment.