Update v-clone-website: --skip-plugins --skip-themes

This commit is contained in:
myvesta 2024-04-24 13:14:36 +02:00 committed by GitHub
commit 05f5288d9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -421,10 +421,10 @@ if [ $IT_IS_WP -eq 0 ]; then
else
cd $TO_FOLDER
echo "=== Replacing $FROM_DOMAIN to $TO_DOMAIN in database $TO_DATABASE_NAME"
sudo -H -u$TO_USER wp search-replace "$FROM_DOMAIN" "$TO_DOMAIN" --precise --all-tables --skip-columns=guid
sudo -H -u$TO_USER wp search-replace "$FROM_DOMAIN" "$TO_DOMAIN" --precise --all-tables --skip-columns=guid --skip-plugins=$(sudo -H -u$TO_USER wp plugin list --field=name | tr '\n' ',') --skip-themes;
if [ "$FROM_USER" != "$TO_USER" ]; then
echo "=== Replacing /home/$FROM_USER/ to /home/$TO_USER/ in database $TO_DATABASE_NAME"
sudo -H -u$TO_USER wp search-replace "/home/$FROM_USER/" "/home/$TO_USER/" --precise --all-tables --skip-columns=guid
sudo -H -u$TO_USER wp search-replace "/home/$FROM_USER/" "/home/$TO_USER/" --precise --all-tables --skip-columns=guid --skip-plugins=$(sudo -H -u$TO_USER wp plugin list --field=name | tr '\n' ',') --skip-themes;
fi
sudo -H -u$TO_USER wp cache flush
sudo -H -u$TO_USER wp config shuffle-salts WP_CACHE_KEY_SALT --force