Multiple Errors w/ Local Update; Attempts to Reinstall Local/Restore Sites Fail (MacOS)

Hey Local team, really appreciate any help.

With the 2.2.1 Update I started getting multiple errors on my sites (Local router problems, 503 errors, all of the above). I had changed my sites’ domain names and worried this was the cause of the issue; without being able to access WP Admin on any of my sites, I tried to uninstall, reinstall, and restore my sites from a local folder.

Unfortunately this didn’t work. I first received the CRITICAL **: the specified directory is not a mydumper backup error, when running the myloader -p root -d /app/sql --overwrite-tables --database local command, as discussed in the can’t restore a local site ticket.

Reviewing that ticket’s discussion, I used @clay’s troubleshooting recommendations (delete/recreate metadata file, ensure correct PHP version on new sites) to no avail.

Next, I ran @mrsippy’s code: myloader -p root -d /app/sql --overwrite-tables --database local , and rather than receiving the unknown collation error as mrsippy had, I received Error restoring: File doesn't exist errors:

I can confirm that the SQL files do exist:

26 PM

Checked the permissions… (At this point, this is well outside of my wheelhouse, so the problem might be obvious to you… I’m lost though.)

02 PM

Finally, ran the myloader -p root -d /app/sql --overwrite-tables --database local one more time, and it didn’t kick back the mydumper error. Thought it was working again, checked the site, and it’s completely blank. None of the SQL is loading, even though, again, it’s there… I’m worried I’m overcomplicating the issue, but it’s driving me up a wall.

I can’t access my dev sites at all – not too big a problem with my live sites, but the ample progress & non-live sites I created in recent weeks are lost if I can’t access them from the Local file/Archive.

Desperate for your help – thank you!

Misha

Hi @misha,

Thanks for all of the detail and screenshots!

Based off of this, it may’ve been a mounting/NFS issue. One thing you can do in this case is go to Help » Restart Local’s Machine.


Considering that the database still didn’t import properly, I would try the following:

  1. Upgrade to 2.2.3
  2. Right-click on the site’s folder and click on the “Compress” option
  3. Drag-and-drop the resulting archive onto Local’s main window to trigger an import
  4. Go through the import steps. Make sure you select MySQL 5.6 if you select the Custom environment.

Hey Adam,

Thanks for the help – I really love the addition of the drag and drop import function. Unfortunately still having some issues, I must be doing something wrong…

After compressing the old site folder, importing, and using the same custom environment options (including MySQL5.6), loading the WP-Admin kicks back Configuration Error: Your wp-config.php file has an empty database table prefix, which is not supported.

Confirming that my WP Config had a prefix set (which it did, $table_prefix = 'wp_';) I saved the file, restarted the site, and restarted local machine. Now, loading the WP-Admin kicks back One or more database tables are unavailable. The database may need to be repaired. and loading the website landing page kicks back Error establishing a database connection.

Adding WP_ALLOW_REPAIRS', true to the WP Config and started the repair process kicks back Failed to repair the wp_xxxxx table. Error: Table 'local.wp_xxxxx' doesn't exist. on the majority of the tables, save comments and commentmeta. Confirmed again that tables exist and have content.

Is it possible Local is confusing the local.wp_ prefix versus wp_? If so, I tried both changing the file names (dropping local. from the table names) and adding local. to wp-config’s prefix setting with no success.

Thanks again for your help, any guidance is appreciated.

Misha,

Thanks for the screenshots and details!

Can you provide one more screenshot of what you see in Adminer? You can access Adminer by going to the Database tab for the site in Local and then clicking on the “Adminer” button.

1 Like

Update – I tried recreating the problem with other sites, and results are all over the place. If the site I’ve been discussing above is Site 1, I tried another import, Site 2…

For Site 2, the site archive was imported without problem. I was able to load WP Admin and confirm that the site was functioning, but it didn’t import pages, posts, or comments.

For Site 3, I ran into the same issues as Site 1 – attempting to load WP Admin kicked back the “empty database prefix” error.

For Site 4, I had no problem loading WP-Admin, so the tables are technically there, but I quickly realized nothing had imported properly. For example, plugins were there, but they were all deactivated. No pages, posts, media, or comments were there.

Tried one more time, with Site 5. Imported everything, went to view the WP Admin and front end, and this was the result: