Pulled site has no users, homepage throws 404

Issue Summary

Pulled an existing site with Local (was built via Local and originally pushed via Local). Got a generic “there was a problem”. At first it was redirecting to production so I did a search-replace. Now pages throw a 404 and I can’t log in as it turns out there are no users of any kind shown via “wp user list”.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    So far just this site.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?


Not sure how anyone could purposefully duplicate this.

System Details

  • Which version of Local is being used?

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

    • For example: macOS Catalina or Windows 10 Professional
      MacOS ventura 13.3
  • 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.

Hi @DavidG

Can you share a copy of your Local Log? Retrieving Local’s Log File

What host did you pull the site from?

local-logs3.zip (684.4 KB)

The site is on Flywheel. It was originally created on Flywheel, downloaded via Local and then developed on Local, then pushed back to Flywheel. Additional work required getting a fresh copy from Production through Local and that’s when this happened. I’ve tried re-pulling a few times but get the same results each time.

Hey @DavidG

I see there are multiple sites with this same name on the Flywheel end. Which URL is the one you’re troubleshooting with? Do you mind if I add myself and try replicating on my side?

If by multiple sites you mean that this one client has multiple sites, yes, but they are 3 distinct sites. This is the one that has “Food Ingredients” in the site name and the first part of the URL is foodingredients. Does that help identify the exact site?

Yes, please go ahead and try to duplicate. Though I was doing a pull of modified or updated files only (I don’t recall which), rather than pulling a fresh copy of the entire site.

Hi @DavidG

Have you tried doing a full pull to see if that resolves anything? Or downloading a backup and direct importing it?

I haven’t tried that as I didn’t know there was a way to do a full pull to the same location (for git). Is there a way to do that?

Hi @DavidG

Sorry I didn’t realize you were working in GitHub for this. So did the issue arise after you pulled from Flywheel or after you pulled from GitHub?

Rewinding here, was the site originally in your Local app already and then you did a new pull from one location to it for modified files? Or was this your first time getting it into the app?

The site was initially created on Flywheel (standard install, no blueprint). Then that was pulled via Local and built. Once built it was pushed via Local to Flywheel. Since then, the client had made some updates to the live site that would affect some new work, so I tried to pull the updates from Flywheel (including the db) and that’s when this happened.

There have only been commits/pushes to git, never a pull.

Hi @DavidG

Thank you for all the details. So I tried pulling that site down myself and both times it errored out. I checked my logs and saw this:

{"thread":"main","class":"ImporterConnectV2","stack":"Error: ERROR 2006 (HY000) at line 915: MySQL server has gone away\n    at %%appPath%%/main/_helpers/importSQLFile.js:1:2560\n    at Generator.next (<anonymous>)\n    at a (%%appPath%%/main/_helpers/importSQLFile.js:1:742)\n    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)","level":"error","message":"Unable to import /Users/nickbarelos/Local Sites/tree-top-food-ingredients/app/public/.connect-pull.sql","timestamp":"2023-04-05T13:07:48.809Z"}

Note this part, ERROR 2006 (HY000) at line 915: MySQL server has gone away\n

The issue is arising due to the SQL database import having fields around that line causing it to exceed the max_allowed_packet setting.

I was able to work around the issue by increasing the max_allowed_packet to 128M which then allowed the SQL file to import.

Here are the steps you can take to change this setting, and then try a new pull:

  • Open Local and head to the site
  • Go to the Site Folder and locate this path: conf > MySQL > my.cnf.hbs
  • Open the my.cnf.hbs file in a text editor
  • Find the line max_allowed_packet which is likely set to = 16M
  • Amend the 16M to 128M - Ensure you leave everything else in place - just change the number only - Save the file.
  • Stop and Restart the site to save the changes
  • Trying pulling the site again

Once I went through those steps I was able to successfully pull, access the site and see the user list, etc.

Tried those steps (a couple times, double checking, and restarting Local itself) and got errors. Within Local after the pull it said “Uh-oh! We ran into and issue when pulling from Flywheel”. And when I tried to open the site it threw a 503 “There was a database connection issue”. And when trying to open Adminer it said “No such file or directory”.

Hi @DavidG

At this point, it might be necessary to start fresh. Is there anything on the site within your app right now that you need to save? Or can it all be purged so you can attempt a fresh pull and start with a clean slate?

There is nothing locally that I need to save.

I deleted the site in Local (kept the files) and then pulled a fresh version to a new folder (not that same as the old site files). Still got the “Uh-oh” message in Local and when I tried to load the site it started going through the fresh WP install process:

Then I deleted everything (old site files and the new one just pulled) and tried using a different local URL during the pull. After this pull got the same “Uh-oh” message, and once again when loading the site it started the initial WP install process.

Next, I deleted everything locally again and then tried to pull from staging instead of production. Same results, loading the site started the initial WP install process.

Then deleted again and tried pulling to a different drive and got the same results.

Next, I tried pulling two other sites that I hadn’t pulled yet and both worked with no issues.

Then I tried doing an updated pull from another site of this client (the foodservice one) that was also initially created on Flywheel, pulled with Local, built, then pushed with Local. Pulling this site worked fine.

It seems there’s something specific to this site that is affecting both production and staging. Again, I’ve tried a fresh pull, a fresh pull to a different drive, a fresh pull using a different local URL, pulling from production/staging… and each time it fails. But no other site is having this issue.

Any ideas how to troubleshoot and get this site to pull properly?

Hi @DavidG

After you deleted everything and tried the pull again, you’ll still need to do the DB fix issue that we did above^

So your workflow will look like this:

After that, it should work!

That worked!!

Thank you very much for all your help!!


Glad to hear it @DavidG! Sorry for all the extra work this took but glad we got you there in the end. Happy Developing :green_heart:

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