Error after PHP 8.0.2 update on newest Local version

Thanks for the answer!

I actually tried to clone, right after clicking clone it will burst out the error 2 times and the cloned site will have the same problem.

Right now I have cloned production site again and set up new clean Site just to get my things going - all the changes for my theme were in GIT anyway. Guess this problem is not too common and might be a problem for early adopter of new versions (both Local and PHP).

I’m trying to replicate this on my end, and I’m not seeing any way to upgrade the PHP 8.0.2 in Local.

Can you share a screenshot or screencast of how you are updating PHP as well as the errors that you are seeing?

Ahh, I think I see and was able to re-create. I’ll write up a bug for our devs to take a closer look!

Hi, community. This appears after I press in “cancel” While Local was updating to PHP version 8.00. Now i can’t launch my Local Site, it appears this Error message 2 times:

-TypeError: Cannot read property “version” of undefined Stack Trace:

  • Which version of Local is being used?

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

1 Like


Had pretty much same problem, haven’t heard anything about any fix or anything.

Thanks for the additional info! I’ve merged your topic into this one so that we have one place to track this bug!
Same thing happened to me on Windows 10.
I even removed Local completely and reinstalled it. As soon as I install the fresh version, I get the same error. Even clicking anything else on the Local screen results in NO response from that window. It’s almost like the whole thing has crashed entirely and will no longer respond.

Local Log:

I’m having the same problem everyone else is. Has anyone found the solution yet?

Hey @coralbeauty – This hasn’t been fixed yet. To help get a few more data points, can you please provide your Local Log? See this Community Forum post for instructions on how to do so:

local-lightning.log (147.9 KB)

Hi Ben,

FYI: I tried cloning the one site that I was still able to access and the cloned version is not viewable either. I also tried unchecking “read only” as was suggested by another user, but it didn’t work either.

Thanks in advance for the help!

*Update: the cloned site initially redirected login, which I worked around by editing the URL in the search bar, and I was then able to see my admin dashboard.

The other site is still throwing error messages at me when I click on it to try to open it.

If cloning a site doesn’t work, here’s another way to get a site to PHP 8.0.2:

  • Create a zip file of your website with the contents of \public and \sql
  • Delete the site from Local (I’d create another backup from File Manager just in case)
  • Import the site (option is in the hamburger menu) from the zip file
  • You can use the deleted website name without issue during config
  • Specify PHP 8.0.2 for your server config in the next step.

It’s a workaround that I’ve had no problems occur.


Hi I also how the same issue but with php 7.4 and I made a post yesterday about it

yes i did it and it worked thanks man you saved me so much because i was working on my website and did not have a backup of that and did not remember what i even did so thanks

5 posts were split to a new topic: Cannot read property socket of null

Thank you so much, you save me from lots of trouble. Hats off man.

Guys, its simple. This issue occurs when you try updating the PHP of your web project incorrectly, something like force closing the localwp application before the download completes or a applicationn crash.

In this case, the application does not update the sites.json file in C:\Users\sreeh\AppData\Roaming\Local with your new PHP version. It won’t save any PHP service, so the you usually get the incomplete stack error.

So, to fix this issue, open the sites.json from the above mentioned location and add your old working PHP version under "services": {

This will look something like this:

"php": { "name": "php", "version": "7.3.5", "type": "lightning", "role": "php", "ports": { "cgi": [ 10028, 10029 ] } },

If you already have the above JSON under your project, there is no need in pasting all this. Just change the version.

Save the sites.json file and restart the LocalWP application and try running the application. It will work.

You can also follow KhakiMan’s answer to import as new project, but note that it won’t have the recent database. You might lose recent changes to your website. This happens because, the .sql dump only triggers when the server is stopped and restarted manually. This doesn’t account for crashes as far as I know.

For this, there is a solution. Open Adminer in Database tab to access your database and export the website database you were working on. Open your project and simply hit export to .sql

Later replace that .sql file with local.sql file in \yourwebsite\app\sql folder. Next, import the project. This way, you can never lose any data.

If the import didn’t work or stuck at importing database, you will need to restart you PC and try importing again.

And a final note. Backup the whole website in Local Sites to somewhere else before doing anything.

This is my first answer on any forum. So, sorry if the response is longer than usual.

1 Like

Thank you, this worked for me

Nice write-up and thanks for the additional info!

I wanted to let this topic know that this should be fixed in the latest version of Local which can be downloaded and installed from the releases page:

If you do run into any other problems with creating a PHP 8 site under Windows, please create a new topic!

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