Skip to content

Instantly share code, notes, and snippets.

@Arvoreen
Created March 28, 2019 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arvoreen/dec1cae37d93342ae6302d487b43ae93 to your computer and use it in GitHub Desktop.
Save Arvoreen/dec1cae37d93342ae6302d487b43ae93 to your computer and use it in GitHub Desktop.
Site specific clean up script. Assumes alias already configured in wp-cli
#!/bin/bash
wp @azurenight search-replace 'https://www.azurenight.com' 'https://backup.azurenight.com'
sed -i 's/\/var\/www\/html/\/var\/www\/localhost\/htdocs/' /var/www/localhost/htdocs/azurenight/.htaccess
perl -p -i -e 'print "define('"'"'JETPACK_STAGING_MODE'"'"',true);\n" if /^.*Happy blogging.*$/' /var/www/localhost/htdocs/azurenight/wp-config.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment