Remove w3-total-cache on migrated domain

Because it can make hell in memcached cache
This commit is contained in:
myvesta 2020-05-08 13:10:30 +02:00 committed by GitHub
commit f198adb3b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -313,6 +313,13 @@ if [ $IT_IS_WP -eq 0 ]; then
php7.0 /root/Search-Replace-DB-master/srdb.cli.php -h localhost -n "$TO_DATABASE_NAME" -u "$TO_DATABASE_USERNAME" -p "$TO_DATABASE_PASSWORD" -s "$FROM_DOMAIN" -r "$TO_DOMAIN"
else
cd $TO_FOLDER
if [ -d "wp-content/plugins/w3-total-cache" ]; then
rm -f wp-content/object-cache.php
rm -f wp-content/db.php
rm -f wp-content/advanced-cache.php
rm -rf wp-content/w3tc-config
rm -rf wp-content/plugins/w3-total-cache
fi
sudo -H -u$TO_USER wp search-replace "$FROM_DOMAIN" "$TO_DOMAIN" --precise --all-tables --skip-columns=guid
sudo -H -u$TO_USER wp cache flush
fi