Import/Export a WordPress Site

This help document will walk you through how to import and export a site to and from Local. It will also go over how to restore from only Local site files.

Import a site using a zip

Local is pretty flexible about being able to import a WordPress site from a zip archive.

There are two required things that Local needs for the import to be successful:

  1. The wp-content folder (containing plugins, themes, and uploads)
  2. A database dump as a sql file

There are a few ways to get a zip backup of your site: 

Flywheel: Download a Backup 

WP Engine: Download a Backup

Or backup from a different host using a tool like WP Migrate. Here is a help doc to walk you through the steps of using the free version of WP Migrate Lite.

Once you have your backup, your zip archive will probably look something like this:  

note

Note that in this case, the database dump is next to a files folder, which contains the wp-content folder.

All you need to do is import this zip file by dragging and dropping it over Local or selecting “Import” from Local’s menu.

Local will ask you a few questions about the site, such as the Site Domain as well as the folder you want to use to hold the site. Depending on the size of the archive, the import can take a few seconds for smaller sites, or much longer if the zip file is quite large.

Options screen when importing a site into Local.

Manually Import a Local site

If you’re getting errors when importing a zip file, you could attempt a manual import using these steps:


Restore from only Local site files

There are some cases where you might need to re-import a site into Local using only the files contained within the site folder. Power failure or breaking changes caused by a system update can force you to restore a backup of your Local WordPress sites.

If you can get the Local site folder from a system restore point or a time-machine backup and it has both the WordPress files as well as the sql files, then you have everything you need to re-import the site!

To give some context, you would want to zip the whole site folder, including the app and logs folders. Using the following screenshots as an example, you would zip up the wordpress-import folder, and then use the wordpress-import.zip file to import into Local by dragging and dropping the archive over Local.

Local site App folder
Local site sql folder

Export a site

Start by opening “Local” and ensure that the site you want to export is running. Next, right-click on the site and select “Export.” Follow the prompts to save the website in a place that you can find it like the Desktop!

The zip file that is created contains everything you need for the site, including Media, Plugins, Themes, and an export of the database! The export is the entire /wp-content folder and the database.