Request Error 502 after Local last updates

What issue or error are you experiencing?

Hi there!
I installed Local on Windows, installed Wordpress with a theme and started working on a website.
But today, I updated Local and I had this 502 error,

And I can’t find my wp data on the root folder and everything seems deleted :cold_sweat:
But the site appears on the Local Sites (but as you can see, he can’t find Wordpress version)


How can I fix this please?


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


System Details

  • Local Version: Version 9.0.5+6706

  • Operating System (OS) and OS version: Windows 10


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
logs.zip (291 Bytes)


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 @jcdiehl

If you create a new, blank site in Local can you access that okay? If you can, then you may want to try reimporting the site getting the errors. The steps would look like this:

  • Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
  • Once you have those copied, completely delete the site from Local
  • Restart Local/your machine
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Hi Nick,
thanks for your reply,
I tried to create a new blank wp site and the access is working,

My “go to site folder” looks like this
Local-bug3

For the steps you suggested (copying the site), is it different from an export?
Because I tried to right-clik on my root site, and do “Export” and it collected everything on a zip file.

Correct basically just trying to get a copy of your site so that you can reimport it into Local. So if you do the export option you can try that zip by just dragging and dropping it over Local. If you want to use the same name/domain however you’ll have to delete the old version first.

OK, I created new Local Site using another name,
And I imported the zip,
But I didn’t delete the older version, and I still have problems :


local-bug4
Do I need to delete all the files from the previous site, restart my computer and Local?

Do I need to delete all the files from the previous site, restart my computer and Local?

I’m not sure that is the issue here, but you could certainly give it a try!

Some other things you could try:

  • Do you have a lot of plugins on this site? Or any security, firewall or user management plugins? I wonder if something needs disabling here. You could use Site Shell and run wp plugin deactivate --all as a test.

  • As another test if you change your Router Mode to Localhost are you able to proceed? Preferences>Advanced>Router Mode>Localhost

I tried to change it but I’m still stuck,

For the plugins, I have installed 2 map plugins to test them.
But where can I disable it using Site Shell? I don’t know how to do this process,
Tks :wink:

Hi @jcdiehl

In your Local app, under your site’s name, you’ll see a button for Site Shell

Once you open that you could use WPCLI commands like the one I provided to try and disable the plugins and see if that works for getting things running.

Hi Nick,
I did this but I’m not sure this is correct because nothing happens…
local-bug6

Hi @jcdiehl

Yeah it seems like an issue related to your original problem, but it’s curious this only happens for this specific site right? If you create a new site that works fine?

You could try running wp core download to see if you’re able to manually set the core files.

If I create a blank new wp site, it’s working,
I tried with using wp core download
but I have this error message :
local-bug7
Is that correct?

Are your site files being saved to D drive or to C drive?

When you create new sites that work and click Go to site folder are you going to the same place as you are for this site? Maybe something shifted on your machine when you updated and other is a problem with syncing or permissions with a different directory.

When I first created my local site, I choose another path for the root file which was on D drive.
Then 3 days ago, I updated Local and it’s not working anymore,
I exported a zip version of my wip website.
Then, I created a new Local Site with the zip import.
My path option was by default on C:\user.…
But this copy of my first site is not working either, so I don’t know what to do…

Let’s try this route instead.

  • Create a new, blank site in Local since that seems to work okay right?
  • Then unzip the export of your site that’s not working somewhere like your Desktop
  • Manually import your content, DB, etc into the blank site using the steps here:

Manually Import a Local Site

OK, tks, I’ll give it a try :wink:
Another question, by default, where can I find the wp-content folder ?

When you click on the Go to site folder, from there you’ll click on App > Public and your WP-Content will be within!

OK so the problem is that all the wp-folder are gone,
I thought it was strange not to find them in the app\public folder…

So, in my "Go to site Folder ->app\public" I have just one file : local-phpinfo.php and nothing more…
This is my first old site, then it explains why the copy didn’t work?

Now, can I reimport all the data from the database?

You can still import the database if have that, using some of the manual steps in the link I shared above.

Could you files have shifted to another drive if you search since you were using different spots? Local wouldn’t have wiped anything out with an update but if there was some sort of corruption or disk space issue they might have gotten removed due to something like that.

In the future it might be a good idea to have a backup workflow where you store export copies on your desktop or in external/Cloud storage. We also have a baked in Cloud Backups feature you can use as well. Cloud Backups

OK, I tried to search wp files on my drives, but nothing concerning my first site,

But the Go to Site folder of my site copy is really heavy (1.8 Go) so I presume that there are datas inside of it right?

Is there a solution with :

  • Connect on my final website server (with wordpress already installed)
  • Install the blank wordpress theme I used on Local
  • Reimport the database using phpmyadmin for example?

The idea is to get back the structure of the site, built with the theme and elements…
Is this possible?

It’s all dependent on what you can locate on your machine concerning the original site.

If you only have the database, you can spin up a new site and use whatever theme you want and then import the database either manually or with our native Database management AdminerEVO.

The manual steps would be similar to what I shared above, but you would skip the content piece if you can’t locate that.

Manually Import a Local Site