From 9646fc3511d4a42b30329e71d97bf91d24d678e7 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 21 Sep 2023 13:23:44 +0000 Subject: [PATCH] Add importstaging.sh --- importstaging.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 importstaging.sh diff --git a/importstaging.sh b/importstaging.sh new file mode 100644 index 0000000..53b4e03 --- /dev/null +++ b/importstaging.sh @@ -0,0 +1,5 @@ +#!/bin/bash +liveURL="`cat /var/www/webroot/ROOT/livedomain`" +stagingURL="`cat /var/www/webroot/ROOT/stagingdomain`" + +cd /var/www/webroot/ROOT/ && wp db import /var/www/webroot/ROOT/dbexport-staging.sql --path=/var/www/webroot/ROOT/ && wp cache flush && wp search-replace $stagingURL $liveURL --all-tables --precise && wp cache flush \ No newline at end of file