#!/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