Latest 2.4.0 update can break all sites... again... if you update the environment

Have run the gauntlet that is updating Local by Flywheel this morning - updates are meant to make things better, right?

Anyway, my issue is exactly the same as this one except without the issue of the VM running out of disk space: WordPress Installation Fails and can't connect to Database


Creating new sites fail and updating old sites with the ‘New Environment’ also causes them to fail but old sites working on the old environment (PHP 7.1.7 and MySQL 5.6.37) still work. I daren’t touch that ‘Update Environment’ button if I want to get any work done today!

Ok, a quick update:

It turns out I can create new sites but only if I use a custom environment, choosing nginx, PHP 7.1.4 and MySQL 5.6 as the options. If I use the ‘Preferred’ environment that Flywheel recommend, creating a new site fails, as per the thread linked to above.

I used to only use Custom environments but switched to Preferred as I was running into issue using Apache instead of nginx.

It’s a workaround, for now.

Yeah it surely breaks excisting site. Now I get this " 502 Bad Gateway"
Anyway to role back to former Local install. ??

I don’t think there’s a way to role back to a previous version as the update will alter the VM.
Replacing the app in Applications alone won’t work.
Unless you have a backup e.g. in Time Machine you can restore from?

Yes, I can confirm exactly this issue with 2.4

Do not try upgrading environment - it will break your site

This is strange.
I updated both on windows and mac to Local 2.4.0 and updated the preffered envoirments of 3 sites. All work fine…

I updated and get the error 502 too, but before I to update, I created a zip with my sites so I just need import them using Flywheel and works fine…

Edit: The first site I updated using “Cloning” option and the Clone works fine.

Sorry to hear of other’s having trouble.

I however can report the update to 2.4 on macOS went fine for me.

I will note that updating environments on several sites did fail, harmlessly. Unable to backup MySQL (but I’ve always gotten that from time to time and it never harms anythiing I’m aware of – we don’t work local on DBs).

Closing and restarting Local, then restarting the sites and again initiating the enviroment update I was eventually able to get them to update.

I’m really not sure why they were failing (half of them I’d say), but I think it’d fail more often when I was trying to update more then 3-4 sites at once (some of which are very large sites).

The other thing you might want to try is to CLONE UPDATE. Then delete the clone (really), then go back and update the original. This often works for me.

Loving dark mode…

Finally, for those updating to PHP 7.2. 7.2 is is known to still break a LOT of plugins… yeah you can do it, but be careful you’re not blaming new PHP fatals due to 7.2 on Local.

1 Like

Thanks, that’s helpful. Your clone then update then delete clone method sounds interesting.
I’ll look into those suggestions and see if I can get a site to update to the new environment properly.
For clarity, i’ve tried restarting local, VirtualBox, and my computer but to no avail. I’ve only updated one site to the new environment so far but that’s the broken one. Creating new site using the new environment was a no go too.
It’s arguable though that none of the above should be necessary when updating Flywheel, ever.

I haven’t had any issues with PHP 7.2 and any plugins personally but that’s good to know too.

I confirm also that I got “502 Bad Gateway” page after update environment… I must go back to custom environment to make it work again

Trouble here, as well. A few more observations:

If I have Faster Docker Volumes turned ON , I get I get the WordPress installation screen (Choose a language).
If I have Faster Docker Volumes turned OFF , I get “Error establishing a database connection”.

More disconcerting is the message that I get when I try to log in to the database via Adminer: “No tables.”

I’ve never been able to use Faster Docker Volumes. It’s never ever worked for me in Local by Flywheel.

As much as I was hoping to work this issue through and determine what the root cause was with this, I’ve got a client deadline and had to pull my live site back into Local and get back to work.

With that said, I’ve got well over a dozen sites that are due for an environment update - this was my first. I’ll continue to post my results here and keep the gang at Flywheel Engineering in the loop.

In project-name/app/sql I see all the tables, but when I tried viewing the database via Sequel Pro I got this error:

Unable to connect to host, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Can’t connect to MySQL server on ‘’ (61)

I’m having the same issue as zforsman above. Crazy issues with connecting to a db among other things.

Same here. All my sites are out of whack.

1 Like

Just updated to 2.4.1.

I did have an issue installing after it downloaded the update via the in-app update mechanism. Had to resort to downloading Local 2.4.1 from these forums and overwriting the app in the Applications folder.

I then tried to update a fairly non-critical site to the new environment from a custom environment using the new ‘update and clone’ method and this seemed to work at first but then started to hang and failed to complete. The site itself is tiny so I don’t think the size is an issue. I then canceled the clone migration to the new environment and deleted it. Now, for some reason, even though the original site seemed to be untouched, I cannot start it at all. Everything looks fine - it’s still a custom environment and PHP and MySQL seem to boot however, it won’t move beyond the ‘Starting’ phase. Accessing in the browser gives the standard 502 error message. Looks like I still won’t be attempted to update any sites.

Do these releases even get tested?

A quick update: The site was stuck ‘Starting’ but I right clicked on the site and clicked ‘Start’ again and it then started and gave the green light next to the site. Unfortunately, it still gave the 502 error when trying to access it in the browser. I could SSH into the site successfully though.

Right clicking on the site and selected Show in Finder has allowed me to delete the ‘conf’ folder, rename the ‘conf-custom-1-3-1’ folder to ‘conf’, restart the site, and this got the it working again.

Another quick update: The update to 2.4.2 seems to have fixed most things for me this morning.
Updating and cloning a custom environment to a preferred one still has issues but I can now upgrade from custom to preferred and preferred to preferred environments again. Hurrah!