Multisite Migration Live to Local

Hey @lessis

The above steps are mostly to convert an existing “regular” site in Local into one that can support Multisite.

Any way you do go about this will involve manual steps, especially to the Database since the urls are changing.

While the above commands do work, I would likely do it slightly differently:

  1. Create a new, blank multisite in Local. This will ensure that the Local server config is correct.

  2. Manually extract the zip backup somewhere, for example on your desktop.

  3. Move and replace the contents of the wp-content folder from the Desktop location over the wp-content folder within the ~/Local Sites/example-site/app/public/wp-content folder

  4. Drop the Local DB tables, and manually import the DB from the backup. This is up to you how you’d like to do it. Personally, I feel like ssh'ing into the container and using wp db commands to be the easiest method for doing this.

  5. Generate the necessary SQL to update the URLs in the database. Step 4 of this help doc outlines that pretty well: https://getflywheel.com/wordpress-support/how-do-i-go-live-on-flywheel-with-a-multisite/ and makes use of this tool to help generate the SQL: https://wpmultisitedomainreplace.com/

  6. Run the generated SQL commands against the DB to update the URLs. Again, this is dependent on how you’d like to work, but I’m all for using wpcli.

Hope that helps give you a general workflow. The other option is what’s outlined in the above comments, where you basically import the site using Local’s import functionality, and then take the necessary steps to update the server settings.

Let me know if you have any questions!

– Ben

2 Likes