docker-compose up -d
Server: db
Username: wordpress
Password: wordpress
cd ~/Sites/ninjadevs.io/ninjadevs.io/wp-content/themes/ninjadevs
npm install
bower install
gulp watch
docker-compose
docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------
ninjadevsio_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
ninjadevsio_wordpress_1 /entrypoint.sh apache2-for ... Up 0.0.0.0:80->80/tcp
phpmyadmin /run.sh phpmyadmin Up 0.0.0.0:800->80/tcp
docker
docker ps
docker exec -it ninjadevsio_db_1 bash
mysql -u wordpress -pwordpress wordpress
mysqldump -u wordpress -pwordpress wordpress > /var/lib/mysql/wordpress_`date +%Y-%m-%d-%H.%M.%S`.sql
exit
ls -la ~/Sites/ninjadevs.io/mysql
Set the right wp-config.php
for your local environment:
cp ~/Sites/ninjadevs.io/ninjadevs.io/wp-config-development.php ~/Sites/ninjadevs.io/ninjadevs.io/wp-config.php
atom ~/Sites/ninjadevs.io/ninjadevs.io/wp-config.php
ssh {REMOTE_USERNAME}@ninjadevs.io
rm -fr BACKUPS
mkdir BACKUPS
mysqldump -u {REMOTE_USERNAME} -p -h {REMOTE_DB_HOST} {REMOTE_DB_NAME} | gzip > /home/ninjadevsio/BACKUPS/ninjadevsio_`date +%F-%H-%M-%S`.sql.gz
cp -Rp ninjadevs.io BACKUPS/ninjadevs.io_`date +%F-%H-%M-%S`
rm -fr BACKUPS/ninjadevs.io_*/wp-content/themes/ninjadevs/node_modules
exit
rsync -chavzP --stats \
{REMOTE_USERNAME}@ninjadevs.io:/home/ninjadevsio/ninjadevs.io/wp-content/uploads \
/Users/{LOCAL_USERNAME}/Sites/ninjadevs.io/ninjadevs.io/wp-content
rsync -chavzP --stats \
{REMOTE_USERNAME}@ninjadevs.io:/home/ninjadevsio/ninjadevs.io/wp-content \
/Users/{LOCAL_USERNAME}/Sites/ninjadevs.io/ninjadevs.io
rsync -chavzP --stats \
{REMOTE_USERNAME}@ninjadevs.io:/home/ninjadevsio/BACKUPS \
/Users/{LOCAL_USERNAME}/Sites/ninjadevs.io/ninjadevs.io
rm -fr ninjadevs.io/wp-content/plugins/better-wp-security
rm -fr ninjadevs.io/wp-content/plugins/wp-recaptcha-integration