Issues Importing Local Site

What issue or error are you experiencing?

Windows 11
New build started a few days ago - latest wp, local, etc…

I built a site on local and then tried to push it to WP Engine dev. Apparently, there is a bug and I needed to install 7.1.1 beta because of the can’t pull local file list bug.

I had to shut down Local to try to run Local Beta.

I created a new site and imported a zip of my existing local site. I used the folder located at:
Local Sites<site-name>
To create the zip file.

The site renders, but it’s an older version. I’m pretty sure it’s an older version of the database. Is the local database storage only temporary or sessions specific?

How do I get the data from my most recent version of the db?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

@wjorgensen

I’m not sure how it generated an older version of the site. What thing specifically are you noticing that didn’t update or change from the previous version to the newly created version?

You could try to manually update the database. The steps would look something like this:

  • Copy the correct SQL dump to the site root.
  • Within Local, open the site shell
  • Import the dump with wp db import <dumpfile>
  • If that works, now Search and replace the domains. wp search-replace ' https://production.com ' 'http:mylocalsite.local'

The database on my local was an older version and was missing 2-3 hours worth of updates. There was no production site to pull from. This was a new build that I started on my local machine.

I ended up just redoing the stuff that was missing from the database.

Hi @wjorgensen - to provide some more detail:

The Local DB is dumped to a backup whenever the site is stopped, exported, or the app is closed. The database is stored in the run folder while the site is running and a backup is created and stored in the sql file at those points I mentioned. Zipping up just that Local Sites/ folder as you mentioned would have grabbed an older database dump.

In the future, if you want to create an export of a site, you’ll want to do this inside the Local UI.

  • Right-click on a site (or use the 3-dot menu next to its name)
  • Choose Export
  • Enter where you’d like it go.

This will ensure the current DB is bundled with the site on export.

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