Last active
August 6, 2020 18:47
-
-
Save jessuppi/53880a878b4615e4353a60adf7d58ca9 to your computer and use it in GitHub Desktop.
Revisions
-
jessuppi revised this gist
Aug 6, 2020 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,3 +13,15 @@ # sed "s#src='https://$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#src='http://$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#src='//$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql ## copy salt keys from production to staging (enables permanent login on both production/staging) ## # sed "/'AUTH_KEY'/c\\$PROD_AUTH_KEY" /var/www/html/staging/wp-config.php # sed "/'SECURE_AUTH_KEY'/c\\$PROD_SECURE_AUTH_KEY" /var/www/html/staging/wp-config.php # sed "/'LOGGED_IN_KEY'/c\\$PROD_LOGGED_IN_KEY" /var/www/html/staging/wp-config.php # sed "/'NONCE_KEY'/c\\$PROD_NONCE_KEY" /var/www/html/staging/wp-config.php # sed "/'AUTH_SALT'/c\\$PROD_AUTH_SALT" /var/www/html/staging/wp-config.php # sed "/'SECURE_AUTH_SALT'/c\\$PROD_SECURE_AUTH_SALT" /var/www/html/staging/wp-config.php # sed "/'LOGGED_IN_SALT'/c\\$PROD_LOGGED_IN_SALT" /var/www/html/staging/wp-config.php # sed "/'NONCE_SALT'/c\\$PROD_NONCE_SALT" /var/www/html/staging/wp-config.php # sed -n "#NONCE_SALT#c $PROD_NONCE_SALT#p" /var/www/html/staging/wp-config.php -
jessuppi created this gist
Aug 6, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ ## fix hyperlinks (but not media src as they are shared with production uploads folder) ## # sed 's#href="https://$SITE_DOMAIN#href="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed 's#href="http://$SITE_DOMAIN#href="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed 's#href="//$SITE_DOMAIN#href="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed "s#href='https://$SITE_DOMAIN#href='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#href='http://$SITE_DOMAIN#href='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#href='//$SITE_DOMAIN#href='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql ## fix sources (mirrors to production uploads folder using Nginx alias so this is just for cleaner source code) ## # sed 's#src="https://$SITE_DOMAIN#src="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed 's#src="http://$SITE_DOMAIN#src="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed 's#src="//$SITE_DOMAIN#src="https://$SITE_DOMAIN/staging#g' /tmp/staging.sql # sed "s#src='https://$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#src='http://$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql # sed "s#src='//$SITE_DOMAIN#src='https://$SITE_DOMAIN/staging#g" /tmp/staging.sql