Skip to content

Commit

Permalink
feat(dev-env): migration from vipdev.lndo.site to vipdev.site
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Aug 7, 2024
1 parent e0effe9 commit 682c809
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dev-tools/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,13 @@ if ! wp core is-installed --skip-plugins --skip-themes; then
else
echo "WordPress already installed"
fi

if wp --skip-plugins --skip-themes option get siteurl | grep -Fq 'vipdev.lndo.site' && echo "${wp_url}" | grep -qF vipdev.site; then
echo "Migrating from vipdev.lndo.site to vipdev.site, please stand by…"
echo "Backing up the database…"
(cd /app && wp --skip-plugins --skip-themes db export)
echo "Replacing vipdev.lndo.site with vipdev.site…"
wp --skip-plugins --skip-themes search-replace vipdev.lndo.site vipdev.site --all-tables --precise --report-changed-only
wp --skip-plugins --skip-themes cache flush
echo 'Done!'
fi

0 comments on commit 682c809

Please sign in to comment.