Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # drop the database
  4. # this step relies on having a WP CLI installed and configured but one could
  5. # use any other method to get the database
  6.  
  7. wp @dev db export --add-drop-table dev_database.sql
  8.  
  9.  
  10. (cd htdocs/wp-content/themes/project-name; yarn build:production)
  11.  
  12. (cd htdocs/wp-content/; rm debug.log)
  13.  
  14. # copy all wp-content content except node modules and cvs related stuff. Please
  15. # note that some content may fall to copy due to excludes
  16. 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/
  17.  
  18. # copy the wpml translation management plugin without excludes because there are
  19. # some files being excluded that should not be
  20. 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/
  21.  
  22. # copy the database
  23. 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
  24.  
  25. wp @staging db import dev_database.sql
  26. wp @staging search-replace "project-name.test" "project-name.com"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement