Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # drop the database
- # this step relies on having a WP CLI installed and configured but one could
- # use any other method to get the database
- wp @dev db export --add-drop-table dev_database.sql
- (cd htdocs/wp-content/themes/project-name; yarn build:production)
- (cd htdocs/wp-content/; rm debug.log)
- # copy all wp-content content except node modules and cvs related stuff. Please
- # note that some content may fall to copy due to excludes
- rsync -aphvP --update --delete --cvs-exclude --exclude node_modules/ ~/code/VVV/www/project-name/htdocs/wp-content user@destination-host:/srv/users/user/apps/clients-project-name/public/
- # copy the wpml translation management plugin without excludes because there are
- # some files being excluded that should not be
- rsync -aphvP --update --delete ~/code/VVV/www/project-name/htdocs/wp-content/plugins/wpml-translation-management user@destination-host:/srv/users/user/apps/clients-project-name/public/wp-content/plugins/
- # copy the database
- rsync -aphvP --update --delete ~/code/VVV/www/project-name/htdocs/dev_database.sql user@destination-host:/srv/users/user/apps/clients-project-name/public/dev_database.sql
- wp @staging db import dev_database.sql
- wp @staging search-replace "project-name.test" "project-name.com"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement