WordPress Site Sync Module for Terminal Tools
Command line scripts for syncing WordPress site assets and databases between
local development environments to/from (or between) test/stage/live
environments with Terminal Tools
- Terminal Tools && server sync core
We’re expecting you’re using envWP for managing your
environments – it might work without it though – let us know 🙂
How to install
ttools with sitesync-wordpress
This is an example of how
ttools can be used to keep your local repo in sync with a dev server.
Start by setting up the sub modules:
git submodule add git://github.com/titledk/ttools-core.git git submodule add git://github.com/titledk/ttools-githelpers.git #is not absolutely necessary, but you'll want it for deployment git submodule add git://github.com/titledk/ttools-sitesync-core.git git submodule add git://github.com/CPHCloud/ttools-sitesync-wordpress.git
Add something along the following lines to your
Menu: Heading1: Title: Local Item1: Title: Overwrite Local Site with Database & Assets from Dev Site Command: "ttools-sitesync-wordpress/local/overwrite-current-with-remote.sh" ServerSync: FrameworkModule: 'ttools-sitesync-wordpress'
That’s it. In order for this to work, you’ll need to have a
Dev environment set up – see
https://github.com/titledk/ttools-core#configuration-example for info on how to do that.
http://wp-cli.org. The entire
wp-cli.phar has been added to
the repository to make deployments as little painful as possible.
cd thirdparty curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
As WordPress is hard coding lots of stuff, you can also use this module to help you fix stuff manually:
wp-cli goes crazy because of php notices
Check you error reporting settings in
php -i | grep "errors|ini"
then uncomment it, or add the following to
env-config.php, if you’re using such: