mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Update v-migrate-site-to-https to use $phpver
This commit is contained in:
parent
a8435cab14
commit
7a13c03e9a
1 changed files with 4 additions and 2 deletions
|
@ -94,6 +94,8 @@ if [ "$DB_EXISTS" = "no" ]; then
|
|||
exit 6
|
||||
fi
|
||||
|
||||
phpver=$(/usr/local/vesta/bin/v-get-php-version-of-domain "$FROM_DOMAIN")
|
||||
|
||||
# ----------- CHECK -------------
|
||||
|
||||
FROM_REPLACE1="http://$FROM_DOMAIN"
|
||||
|
@ -170,9 +172,9 @@ if [ $IT_IS_WP -eq 0 ]; then
|
|||
else
|
||||
cd $SITE_FOLDER
|
||||
echo "=== Replacing $FROM_REPLACE1 to $TO_REPLACE1 in database $FROM_DATABASE_NAME"
|
||||
sudo -H -u$FROM_USER wp search-replace "$FROM_REPLACE1" "$TO_REPLACE1" --precise --all-tables --skip-columns=guid
|
||||
sudo -H -u$FROM_USER /usr/bin/php$phpver /usr/local/bin/wp search-replace "$FROM_REPLACE1" "$TO_REPLACE1" --precise --all-tables --skip-columns=guid --skip-plugins=$(sudo -H -u$TO_USER wp plugin list --field=name | tr '\n' ',') --skip-themes;
|
||||
echo "=== Replacing $FROM_REPLACE2 to $TO_REPLACE2 in database $FROM_DATABASE_NAME"
|
||||
sudo -H -u$FROM_USER wp search-replace "$FROM_REPLACE2" "$TO_REPLACE2" --precise --all-tables --skip-columns=guid
|
||||
sudo -H -u$FROM_USER /usr/bin/php$phpver /usr/local/bin/wp search-replace "$FROM_REPLACE2" "$TO_REPLACE2" --precise --all-tables --skip-columns=guid --skip-plugins=$(sudo -H -u$TO_USER wp plugin list --field=name | tr '\n' ',') --skip-themes;
|
||||
fi
|
||||
|
||||
echo "===== DONE ===="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue