Cant pull/import site anymore - Uh-oh! Unable to import site error

Issue Summary

I have been using local to pull and push between a live and local site for a few months and suddenly today I am unable to anymore. I get an error

I have tried everything to fix it with no luck, local will no longer pull down any live site to local

Tried:

  • Pulling a different site
  • Creating a new site and then pulling down
  • Upgrade local to latest version
  • Completely uninstall and reinstall local we per your instructions starting with a completely fresh copy of local
  • Manually installing the site locally then pull
  • Every solution on this forum for similar errors

Every time I try anything I get the same error

Error: Command failed: /Applications/Local.app/Contents/Resources/extraResources/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysql local -B --disable-column-names -e SELECT option_value FROM wp_options WHERE option_name = 'siteurl';

ERROR 1146 (42S02) at line 1: Table 'local.wp_options' doesn't exist

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Yes all sites

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes local works fine, I just cant pull

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

System Details

  • Which version of Local is being used?
    6.7.0+6347

  • What Operating System (OS) and OS version is being used?
    Mac OSX Monterey

  • Attach the Local Log. See this Help Doc for instructions on how to do so:

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.

3 Likes

I’m experiencing this exact issue as of this evening, when I wasn’t at any point earlier today.

I’m hopeful this is a problem with pulling DB’s due to some unrelated or internet issue if we’re having the same mileage. I was using LocalWP 6.6.x then updated to 6.7.0, which didn’t resolve my issue.

I initially thought my problem was due to manual installs I had made earlier in the day via WP Migrate exports then dragging the zip into LocalWP, but that doesn’t match @andyj’s mileage so maybe there’s a separate cause??

1 Like

Hmmm that is interesting. I’ve been using this setup for months without a problem and this suddenly started and nothing has changed other than the usual site updates.

I just upgraded my mac hoping it may help

I have the exact same error. It applies to all the sites I am working on. MacOS Ventura 13.2.1 and Local 6.6.1+6281. Urgently need a fix. WP Engine support suggested downgrading the version of Local but that has it’s own risks in terms of wasted work hours.

Anyone had any luck manually importing the database into Local from a downloaded back up? Inspecting the local copy of the DB it contains no structural info or data. It has been completely emptied except for the header plus about basic settings code which I can’t post here because it contains too many ‘@’ symbols. I am guessing it was wiped in preparation for rebuilding the DB but that process failed to create the new DB leaving the whole site completely disabled.

1 Like

Same problem here on macOS with all sites and using WP Engine. Yesterday everything was fine, but today no sites can be pulled. It gives the same error as OP: Table 'local.wp_options' doesn't exist.

2 Likes

Same on Windows. Everything was fine yesterday, then this error today. Using WP Engine - not sure if it’s the same for Flywheel.

2 Likes

For what it’s worth, I’m having the same mileage as of this morning. To @bigdot’s question, I’m seeing this when pulling WPE sites but not Flywheel sites – at the very least there’s no error dialog box about a table not existing.

1 Like

And I can confirm this pulls any file deltas between WPE and my local correctly, and the failure is specifically just the database component throwing the error dialog.

Also encountering this same issue. Faced it on 6.6x, updated to 6.7.0 and the issue persists. Pulling site from WP Engine refuses to work.

Hello everyone and thank you for coming here and sharing your notes! The Local Dev team is looking into this as we speak. We have seen some users able to download a backup and direct import that as an alternative. Let us know if that works for you and we can continue to recommend it until a fix is in place. Thank you for your patience and communication with us :slight_smile:

1 Like

Same here. Pulling from WPE to most current Local version on MacOS and getting that same error.

Does downloading to a different version of Local fix this? If so which version should we use? Right now, every site that gets pulled gets completely erased. So it’s kind of difficult to get a workflow going here.

Hi @digisquid - Are you able to download a backup and import the zip as a workaround for now? that might be the easiest solution.

I’m actually new to Local and WP Engine, so is there an easy way to import the zip without creating a new site? I know I can pull a backup and import it to create a new site, but I’m trying to pull down current versions of my existing sites to make changes on them locally before pushing them live.

You can pull ONLY the files and then manually export the database with WP migrate and import that into your database in local.

If you don’t find replace site url and paths in the export, Local will tell you the site url does not match and ask to fix it

Pushing up files and database to live also works for me.

1 Like

We started seeing this yesterday with my team - 3 devs with separate environments all saw this error when attempting to pull in Local WP. Seems that it’s internet borking or some other service outage.

I can manually import my site and DB, and then when I attempt to pull it actually just drops all of my db tables from my local DB. So it’s not just a single table/column issue but the whole DB.

Here are some steps to follow if you’re looking for how to import your site from a backup (using WPEngine admin):

  • From admin, click on Sites
  • Access the site you’re working on and from the environment submenu, select “Backup points”
  • Find your most recent back up and select it via radio button
  • Click “Prepare ZIP”
  • Wait a few minutes for the zip to be generated
  • Refresh the page, you’ll see a Download link in the Zip column
  • Download your zip
  • Import it via drag-and-drop right into Local WP - there’s also a wizard to import it if you’re starting from scratch

From here I’m able to connect to WP Engine, though pulling w/DB is still broken. This will also allow you to access your local WP admin and allow you to keep developing while pulling from WP Engine is broken.

If for some reason your local headless WP DB is still broken, follow these steps:

  • Pop open your site archive zip
  • From the Local WP app, go to local sites > your site
  • click the Database tab
  • click Open Adminer
  • You’ll see an empty db at local
  • Click import SQL
  • From the browser import, find your local SQL in your site archive, should be archive-folder/wp-content/mysql.sql

You should have your local DB filled at that point.

Note, you may have naming conflicts if you don’t erase your current site from your Local app

I am also facing a similar issue… Any potential solution for this?

The error I receive is error 1146.

I’m also having the same issue with Local WP on Windows 11.
image

Hi all - we’ve identified the likely cause of the issue and are busy deploying a fix. Thanks for your patience and for bringing this to our attention so quickly!

4 Likes

Hi again everyone! Thank you for your patience with us, we are happy to report that the issues with pulling from WP Engine detailed above should now be resolved.

For some context, the Local app experienced an outage between 3/16 - 3/17 where users were unable to pull due to an Unable to import site error. This was due to a bug in a patched update to this service the connection relies on. Steps were taken to revert that change and the fix has been implemented as of 3:15 pm CST.

If you have any continuing issues or concerns about this specifically let us know, otherwise hopefully you can resume normal workflows. Happy Developing :slight_smile:

4 Likes