Error after PHP 8.0.2 update on newest Local version

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