Last active
October 7, 2019 12:01
-
-
Save daviddarke/e130ed45a8556b44c7a654eacf1be9c3 to your computer and use it in GitHub Desktop.
This file contains 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 characters
echo "-> Getting rid of local SQL file" | |
mkdir data | |
rm -rf data/development.sql | |
touch data/development.sql | |
echo "-> Booting Docker" | |
docker-compose up --build -d | |
echo "-> Removing vendor folder" | |
rm -rf vendor | |
echo "-> Updating composer" | |
docker-compose exec php composer update | |
echo "-> Installing temporary WP" | |
docker-compose exec php wp core install --url=http://localhost --title='blank' --admin_user='wp' --admin_email='[email protected]' --allow-root | |
echo "-> Activating backup plugin" | |
docker-compose exec php wp plugin activate backups --allow-root | |
echo "-> Getting dev DB" | |
docker-compose exec php wp backups development_sql_sync --sync-direction=pull --allow-root | |
echo "-> Importing dev DB" | |
docker-compose exec php wp db import data/development.sql --allow-root | |
echo "-> Syncing media" | |
docker-compose exec php wp backups backup --allow-root | |
echo "-> Stopping and botting docker again" | |
docker-compose stop | |
docker-compose up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment