Add importstaging.sh

main
jay 2023-09-21 13:23:44 +00:00
parent 5afa9c09c1
commit 9646fc3511
1 changed files with 5 additions and 0 deletions

5
importstaging.sh 100644
View File

@ -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