Merging development site with live site

This is a hard one to answer without opinion entering into the equation. Generally speaking, having a staging or development site to merge the two into is best practice. You can either build this site on your own server (as you’re currently trying) or on the client’s server (where you may be able to work out any kinks faster than if you develop on your server, then try to go live on a different one).

A couple of things you could try if you want to continue working on your server:

  • Instead of trying to overwrite the database on your server, create a new one. Import their data into this new db, then update your wp-config.php file to point to the new db.
  • You could also ask them to export all the pages/posts as XML, then import those. This, however, would only get you the pages/post themselves – not theme settings or any other data that may be important to you.

Depending on the client’s production host, it may be considerably easier to copy their production site onto a production-hosted staging site, then make your changes. Once everything is running smoothly, again depending on the host, you can either rename folders to swap staging and production, or the host may have a method to push from staging to production.