How to restore a Local site export?

How do you use the Local app to restore a site export created with it?

I’m using the Local app with WPEngine.

  1. I ran an export of my local site using the Local app. (Local and WP Engine Connect - Support Center)
  2. I ran a pull from my WPE dev site to my local site and it broke my local site.
  3. In order to restore my local site to its pre-pull state, I ran an import using the exported ZIP created in step 1. (Local and WP Engine Connect - Support Center) However, when I instructed Local to use the domain of my existing local site (and pointed it to the root of my existing local site), the app threw up the following error alert and no option to proceed anyway:

Invalid Domain
DOMAIN.local is already taken by another site. Please choose a different domain.

Would appreciate a how-to or link/s to reference documentation. Thanks!

EDIT. I found this reference, which turns up when searching for how to restore an exported site. It is from 2017 and links to this reference, for importing an export, but does not explain how to restore a site into an existing local domain.

Hi @AMBP - welcome to the Local community & thank you for your question! :wave:

That error suggests to me that another site that is still within your Local sites list has that same domain, is that true?


Thanks and hi, @sambrockway!

That’s accurate I think. DOMAIN.local is the domain of the site that I am trying to restore, and I didn’t remove or delete it from the Local app, so it still exists. Do I need to delete that domain and re-create it? I am reluctant do do that or delete the directory/files of my local site as I wish to salvage the existing file structure because I am using gulp to process source files and that source directory is a sibling of the public directory, part of the tree under my domain-local root directory.

If you had to restore your DOMAIN.local site from an export ZIP you’d created using Local after an update had crashed DOMAIN.local, how would you do it?

Hi @AMBP -

Thanks for that clarification!

I think I’d make a DOMAIN-V2.local so that it could be imported.

Then if it was important for the domain to be exactly the same, I’d probably update the DOMAIN.local Site URL to be DOMAIN-old.local and then update the new one to the appropriate domain.

I’m not 100% sure that this would have the result you’re looking for, but at the very least you’d get the site imported.

Am I understanding your goal correctly?


1 Like

The net result of your steps IS my goal, but involves some rewiring/reconnecting of things afterward, which I wanted to avoid.

The source files for my project use specific paths to process the final theme files, e.g. Documents/project/domain-local/app/source/xxx. They are also associated with a git repo, which cares about the path to those files and my site files, too. So, I’d rather not create a new local domain and set of site files if I can avoid it. It should only be a handful of variable updates, but honestly, it would take me a while to track them down.

Given how smooth the push and pull processes are using Local (when they’re successful), I was hoping that restoring a local site from a local backup/export ZIP using the Local app would be similar to restoring a backup at WPEngine. A couple of clicks, some spinning, and done. Alas, it seems not to be.

Hi @AMBP -

I’m going to rope in another colleague on my end and see if there is a more elegant solution for you to try out before we give up!

We’ll circle back as soon as possible.


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.