Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
@s3w47m88
s3w47m88 / uploads.yml
Created November 6, 2017 01:43 — forked from louim/uploads.yml
Drop-in playbook for Trellis to push and pull uploads from the server to your local machine.
---
- name: Sync uploads between environments
hosts: web
remote_user: "{{ web_user }}"
vars:
project: "{{ wordpress_sites[site] }}"
project_root: "{{ www_root }}/{{ site }}"
tasks:
@s3w47m88
s3w47m88 / sync-prod.sh
Created September 4, 2017 21:07 — forked from retlehs/sync-prod.sh
WP-CLI aliases sync example
read -r -p "Would you really like to reset your development database and pull the latest from production? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
wp @development db reset --yes &&
wp @production db export - > sql-dump-production.sql &&
wp @development db import sql-dump-production.sql &&
wp @development search-replace https://example.com https://example.dev
fi