Unable to import site. Error 1146

I am connected to WP Engine and trying to pull down a site and it’s database

This is there exact error I’m getting

Uh-oh! Unable to import site.

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

I checked the database and that table does exist.

I looked through the forums and I couldn’t find a solution to solve this error.

Please advise.


System Details

  • Local Version: 6.4.2+6012

  • macOS Monterrey version 12.2.1


Local Logs

local-logs.zip (27.2 KB)

Hi @gregslonina

It looks like you’re quite a few versions behind in your Local app. For starters, could you go here and update to the latest release?

Then I would restart your machine, and afterward reset your API credentials with WPE

If you’re still having trouble after that keep us posted!

I updated Local and generated new credentials. And I’m still having issues.

I was looking at the log and there are some Rsync errors.
Can you take a look and let me know what to do next.
local-lightning.log (308.8 KB)

1 Like

@Nick-B
Following up here

@gregslonina Hi Greg! Happy to help.

The first issue you saw was due to the older version of Local; a breaking change on the WP Engine platform required an updated version of Local, released as Local v7.0. So that is fixed! Now, your new issue…

Yes, the rsync logs are helpful. Here’s the culprit:

{“thread”:“main”,“class”:“RsyncService”,“message”:“rsync: [sender] opendir "/sites/prdmaidbrigade/.git" failed: Permission denied (13)\n”,“level”:“warn”,“timestamp”:“2023-07-26T00:52:01.638Z”}

Another user wrote in also seeing an issue with the .git folder causing the pull to fail. We’re working on an improvement to prevent permissions errors on that folder from causing the entire pull to fail - in the meantime, if you’re able, you could help us better understand the issue! Would you be able to SSH into this site on WP Engine and run ls -l in the site folder? Sharing that with us will help us understand what permissions issue Local is running into when it sees the .git directory. Thanks!

Hi @austinwendt
Here are the listed files and their permissions

total 264
drwxrwxr-x  9 wpe-user wpe-user  4096 May 20 04:30 .
drwxr-xr-x  3 root     root      4096 Jul 28 17:58 ..
drwx------  8 root     root      4096 Mar 28 14:18 .git
-rw-rw-r--  1 wpe-user wpe-user   522 May 12  2022 .htaccess
drwxrwxr-x  2 wpe-user wpe-user  4096 Jul 27 18:39 _wpeprivate
-rw-rw-r--  1 wpe-user wpe-user     0 Jul 28 07:42 apple-touch-icon-precomposed.png
-rw-rw-r--  1 wpe-user wpe-user     0 Jul 28 07:42 apple-touch-icon.png
drwxrwxr-x  3 wpe-user wpe-user  4096 May 12  2022 blog-images
-rw-rw-r--  1 wpe-user wpe-user     0 Jul 28 07:42 favicon.ico
-rw-rw-r--  1 wpe-user wpe-user     0 Dec 13  2022 humans.txt
-rw-rw-r--  1 wpe-user wpe-user   405 Feb  6  2020 index.php
-rw-rw-r--  1 wpe-user wpe-user 19915 Jan  1  2023 license.txt
drwxr-xr-x  5 wpe-user   200042  4096 Dec 13  2022 php
-rw-rw-r--  1 wpe-user wpe-user  7402 Mar  5 00:52 readme.html
-rw-rw-r--  1 wpe-user wpe-user   126 May 17  2022 robots.txt
-rw-rw-r--  1 wpe-user wpe-user  7205 Sep 16  2022 wp-activate.php
drwxrwxr-x  9 wpe-user wpe-user  4096 May 20 04:30 wp-admin
-rw-rw-r--  1 wpe-user wpe-user   351 Feb  6  2020 wp-blog-header.php
-rw-rw-r--  1 wpe-user wpe-user  2338 Nov  9  2021 wp-comments-post.php
-rw-rw-r--  1 wpe-user wpe-user  3013 Feb 23 10:38 wp-config-sample.php
-rw-rw-r--  1 wpe-user wpe-user  3463 Jan 10  2023 wp-config.php
drwxr-xr-x  7 wpe-user   200042  4096 Jul 28 02:48 wp-content
-rw-rw-r--  1 wpe-user wpe-user  5536 Nov 23  2022 wp-cron.php
drwxrwxr-x 28 wpe-user wpe-user 12288 May 20 04:30 wp-includes
-rw-rw-r--  1 wpe-user wpe-user  2502 Nov 26  2022 wp-links-opml.php
-rw-rw-r--  1 wpe-user wpe-user  3792 Feb 23 10:38 wp-load.php
-rw-rw-r--  1 wpe-user wpe-user 49330 Feb 23 10:38 wp-login.php
-rw-rw-r--  1 wpe-user wpe-user  8541 Feb  3 13:35 wp-mail.php
-rw-rw-r--  1 wpe-user wpe-user 24993 Mar  1 15:05 wp-settings.php
-rw-rw-r--  1 wpe-user wpe-user 34350 Sep 17  2022 wp-signup.php
-rw-rw-r--  1 wpe-user wpe-user  4889 Nov 23  2022 wp-trackback.php
-rw-rw-r--  1 wpe-user wpe-user  3238 Nov 29  2022 xmlrpc.php

Hey @gregslonina

The team is still looking into this and should have a fix in place soon. As a workaround in the meantime, can you download a backup and direct import it?

Hey @gregslonina - thanks for sharing that! That was very helpful for us in tracking this down.

Like we thought, the issue was when the remote server contained files that Local didn’t have permissions to (like the .git folder). Local should have just kept going anyways… and instead errored out.

Good news, a fix has been released for this to Local Beta. It is working internally and for other users who’ve seen the issue - if you get a chance, can you download the build here and try to pull again and let us know if you see things resolved? Local Beta 7.1.2

I can pull again with the new Beta version :slightly_smiling_face:

However it installed a separate Local application and the sites I already had in my older Local app aren’t there in the beta version.
It looks like I’ll have to add new sites.

1 Like

We should have a new release out soon with the fixes in place, but glad to hear that the Beta is working for you! You’ll have to transfer any sites into the Beta that you want to work on in the meantime, and then move them to the new version when it’s ready. We’re working to get that out as quickly as we can so stay tuned :slight_smile:

2 Likes

Hey @gregslonina - just following up to say Local v7.1.2 is released to production, and you should be good to return to “normal” Local on the new build. If you have any issues with Connect to WP Engine, please let us know!

2 Likes

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