"Error: Command Failed" when installing WordPress on Windows

Seems like a great tool and I would love to give it a try but its been nothing but issues to setup.
I worked through the obvious firewall issues just to be hit with a WordPress install failure.

With a fresh install on my Windows 10 development box, when I attempt to create a new site I receive Error installing WordPress.

I have attached an excerpt of the failure from my local-lightning log below.

{"thread":"main","class":"WordPressInstaller","version":"5.3.2","download":"https://downloads.wordpress.org/release/wordpress-5.3.2.tar.gz","level":"info","message":"Latest version info","timestamp":"2019-12-23T02:09:53.502Z"}
{"thread":"main","class":"WordPressInstaller","message":"Configuring wp-config.php","level":"info","timestamp":"2019-12-23T02:10:01.692Z"}
{"thread":"main","class":"WordPressInstaller","message":"Installing WordPress","level":"info","timestamp":"2019-12-23T02:10:02.008Z"}
{"thread":"main","class":"WordPressInstaller","message":"Deleting Akismet and Hello Dolly","level":"info","timestamp":"2019-12-23T02:10:03.604Z"}
{"thread":"main","class":"WordPressInstaller","stack":"Error: Command failed: C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\php-7.3.6\\php.exe C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\wp-cli\\wp-cli.phar --path=C:\\Users\\Scott\\Local Sites\\test\\app\\public plugin delete akismet hello\n\n    at ChildProcess.exithandler (child_process.js:312:12)\n    at ChildProcess.emit (events.js:194:13)\n    at ChildProcess.EventEmitter.emit (domain.js:469:20)\n    at maybeClose (internal/child_process.js:998:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)","level":"error","message":"Error installing WordPress","timestamp":"2019-12-23T02:10:05.283Z"}
{"thread":"main","reason":{"message":"Command failed: C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\php-7.3.6\\php.exe C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\wp-cli\\wp-cli.phar --path=C:\\Users\\Scott\\Local Sites\\test\\app\\public plugin delete akismet hello\n","stack":"Error: Command failed: C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\php-7.3.6\\php.exe C:\\Development\\personal\\Local\\resources\\extraResources\\site-binaries-win32\\wp-cli\\wp-cli.phar --path=C:\\Users\\Scott\\Local Sites\\test\\app\\public plugin delete akismet hello\n\n    at ChildProcess.exithandler (child_process.js:312:12)\n    at ChildProcess.emit (events.js:194:13)\n    at ChildProcess.EventEmitter.emit (domain.js:469:20)\n    at maybeClose (internal/child_process.js:998:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)"},"p":{},"level":"warn","message":"Unhandled Rejection.","timestamp":"2019-12-23T02:10:22.487Z"}

1 Like

Additional Info: Here is a screenshot of the error popup if it helps.
Are there any additional logs I can check besides the lightning log?
image

Update: After looking at this command it seemed to me that there may be an error in the formatting for the failing command. I was able to get the command to run manually by adding the missing quotes to the --path attribute. However I am unable to resume the installation script. Is there a way to manually update the generated script and re-run while waiting for a fix?

Updated command:

php.exe ..\wp-cli\wp-cli.phar --path="C:\Users\Scott\Local Sites\test\app\public" core config --skip-check --dbname=local --dbuser=root --dbpass=root --skip-salts
Success: Generated 'wp-config.php' file.

I have been unable to find a work around. Is the project open source? I wouldn’t mind branching to fix this issue until a fix can be released.

Anyone?

Ping @flyjack

bueller?.. bueller?..

Anything? I poked around everywhere, couldn’t figure out where to patch this fix. Two god damn double-quotes.

This has been a problem since at least Local Lightning 5.0.6
Don’t get why only a few of us are getting it. And it’s not even about spaces in paths, there are none.

Come on guys. I actually bought a different machine because I needed virtualization for Local v3 to run. Now I can’t get rid of Local v3 and free up space on the system drive because of this hiccup.

As the issue seems to be with the space in the Local Sites directory, you could change the settings to save to a new default folder without a spaces.

You may need to import/export the sites for them to work.

I use “LocalSites” without spaces, still the same kind of error (just like soupress said right above)

Log:

{“thread”:“main”,“class”:“WordPressInstaller”,“stack”:“Error: Command failed: C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-7.3.5+3\bin\win32\php.exe C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\wp-cli.phar --path=C:\Users\Luca\Local Sites\bub\app\public --require=C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\local-wpcli-error-reporting.php plugin delete akismet hello\n\n at ChildProcess.exithandler (child_process.js:308:12)\n at ChildProcess.emit (events.js:203:13)\n at ChildProcess.EventEmitter.emit (domain.js:476:20)\n at maybeClose (internal/child_process.js:1021:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)”,“level”:“error”,“message”:“Error installing WordPress”,“timestamp”:“2020-03-13T10:50:37.140Z”}
{“thread”:“main”,“reason”:{“message”:“Command failed: C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-7.3.5+3\bin\win32\php.exe C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\wp-cli.phar --path=C:\Users\Luca\Local Sites\bub\app\public --require=C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\local-wpcli-error-reporting.php plugin delete akismet hello\n”,“stack”:“Error: Command failed: C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-7.3.5+3\bin\win32\php.exe C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\wp-cli.phar --path=C:\Users\Luca\Local Sites\bub\app\public --require=C:\Users\Luca\AppData\Local\Programs\Local\resources\extraResources\bin\wp-cli\local-wpcli-error-reporting.php plugin delete akismet hello\n\n at ChildProcess.exithandler (child_process.js:308:12)\n at ChildProcess.emit (events.js:203:13)\n at ChildProcess.EventEmitter.emit (domain.js:476:20)\n at maybeClose (internal/child_process.js:1021:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)”},“p”:{},“level”:“warn”,“message”:“Unhandled Rejection.”,“timestamp”:“2020-03-13T10:51:04.614Z”}

1 Like

Not fixed in Local Lightning 5.2.7

I want to migrate away and finally free up space by uninstalling Local by Flywheel v3 but I can’t. I’m on the nth try. I guess this is why you go for VMs… except I can’t say v3 was hitch-free. The complexity of a basic online store in 2020 is simply disastrous.

5.2.8
Still the same problem when you add initial WP site:

image

@clay
@chrisfly
@flyjack
PLEASE HAVE A LOOK TO THIS PROBLEM!

1 Like

Local Version 5.3.1+3095
Bug still unfixed :frowning:

5.3.3+3248
Bug still present

Local installed “for me only (Appdata…)” on WIndows 10 1909.

5.4.1+3311 still affected…

5.4.2 still not fixed

5.5.3+3667 still buggy Wordpress installation

@clay
@chrisfly
@flyjack
Just installed 5.6.3+4270. Still the same bug installing a new Wordpress site:

@ben.turner
Are devs monitoring this old issue? Tell me if you need logs or anything else to fix this annoying issue.

Local 5.6.6+4375. Error still reproducible creating a new local site.

Hey @hexaae – thanks for your patience with this old bug.

I know that there has been some recent work with how wpcli commands are run within Windows. Can you try downloading the latest version of Local and try again?

One other aspect of this is that the Local team has been reworking the way that services work (so PHP, nginx, MySQL) but it means that there might be some manual steps you should try during this troublshooting.

Can you try following the steps in this forum post which should get the latest version of the PHP service and might help with this:

Let me know how it goes!