Skip to content

Instantly share code, notes, and snippets.

@mgirouard
Created May 29, 2013 13:53
Show Gist options
  • Save mgirouard/5670408 to your computer and use it in GitHub Desktop.
Save mgirouard/5670408 to your computer and use it in GitHub Desktop.
An easy way of updating a local WordPress site from a production instance.
cd /path/to/Example
scp [email protected]:production.sql
mysql -u root dev_example < production.sql
mysql -u root dev_example <<< 'UPDATE wp_options SET option_value = "http://example.local" WHERE option_name IN ("home","siteurl")'
rm production.sql
scp [email protected]:uploads.tgz .
tar -xvzf uploads.tgz
rm uploads.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment