From 63765be2e7f91b0fe35a4646c805295c7791f1dd Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 7 Sep 2023 07:23:32 +0000 Subject: [PATCH] Update syncfromlivetostaging.sh Added step to save the staging domain --- syncfromlivetostaging.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syncfromlivetostaging.sh b/syncfromlivetostaging.sh index 8ea697e..e22c179 100644 --- a/syncfromlivetostaging.sh +++ b/syncfromlivetostaging.sh @@ -1,5 +1,6 @@ #!/bin/bash liveURL="`cat /var/www/webroot/sourcefiles/livedomain`" -stagingURL="`wp option get siteurl | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/'`" +#stagingURL="`wp option get siteurl | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/'`" +stagingURL="`cat /var/www/webroot/ROOT/stagingdomain`" cd /var/www/webroot/ROOT/ && wp db import /var/www/webroot/sourcefiles/dbexport.sql --path=/var/www/webroot/ROOT/ && cp -R -u /var/www/webroot/sourcefiles/* /var/www/webroot/ROOT && wp cache flush && wp search-replace $liveURL $stagingURL --all-tables --precise \ No newline at end of file