This is an example WordPress setup to show how this prototype backup/restore WP-CLI command could be used. To fix english and code mistakes, please feel free to pull request here. For further ideas and comments, please participe directly to the original discussion: wp-cli/ideas#5.
git clone https://github.com/mbovel/example-wp-setup
.cd example-wp-setup
.docker-compose up
.- Wait while the MySQL server starts. When the server is ready, the following line should be printed to
stdout
:db_1 | Version: '10.1.22-MariaDB-1~jessie' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
- From another shell in the same directory, restore WordPress core files, database and plugins by running
docker-compose run wp bin/restore.sh
. - Visit
http://localhost:8080/
To restore another version, first checkout to the desired version and then run bin/restore.sh
again:
git checkout 87b156a6fda3f6a091351dd3bb277036584b6317
docker-compose run wp bin/restore.sh
git clone https://github.com/mbovel/example-wp-setup
.cd example-wp-setup
.- Edit
.env
to match local configuration. - Run
bin/run.sh
. - Restore WordPress core files, database and plugins by running
bin/restore.sh
. - Visit the address set as
WP_HOME
.
To restore another version, first checkout to the desired version and then run bin/restore.sh
again:
git checkout 87b156a6fda3f6a091351dd3bb277036584b6317
bin/restore.sh