WordPress multi-site, developing locally and syncing live changes

It’s always a bit tricky moving sites around between live and development servers – and personally I always prefer to have as few plugins running on sites as possible – so I’d not really advocate the ‘plugin’ route.

The solution I use to this is a simple one, but requires a-little manual process.

The steps I’d suggest are as follows:

  • Download via FTP all site files (including the core WordPress files if you like). Once downloaded once, I then use a synchronise command in my FTP application to just download any changed files in the future.

  • Create new database and configure wp-config.php – check this is hooked-up correctly.

  • Export MySQL database from live server.

  • Import this into your new local server based MySQL database.

  • Use the excellent Database Search and Replace script from InterconnectIT – http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ on the database you have imported – this will replace all the live URL references with your local development URL settings.

  • You will probably need to refresh permalinks and maybe configure your local server a-little depending on your setup, but I’ve used this on very large, complex sites (multisite and BuddyPress) without any issues – it has always worked very well for me!

The advantage of using the search and replace script is that it will perfectly migrate all of your menus, widget settings and plugin settings – you will literally get a complete local version of the live site – which you won’t get with a basic XML export 😉