Cannot create a local site with passwords that have spaces?

Bug Summary

Local fails to create WordPress site when password contains spaces.

Summarize the issue in one to two sentences.
Live site has a password with spaces like “Run for home!_” - but if I try and create a new site in Local where the password has spaces, it fails with this error message…

Steps to reproduce

Here’s a video…
local_pass_space_issue.zip (7.1 MB)

As precisely as you can, list the steps it takes to reliably reproduce the issue.
Create a local WordPress site using defaults.
When entering password, use a complex password that contains one or more spaces.

Environment Info

Describe your environment.

  • What Operating System are you using?
    Windows 10 Pro, Version 22H2, OS Build 19045.3570

  • What versions of site software (Nginx, Apache, PHP, MySQL) is used?
    Local defaults

  • What version of Local is installed?
    Version 8.0.1+6490

Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:
local-lightning.log (8.1 KB)

Include any screenshots or video recordings of the issue to help others reproduce.

Hi @jim_hubbard

Thank you for raising this. Checking with the team this might be related to a known Windows bug but if not we’ll dig into it and keep you posted.

I have had this issue for years, and have had to work around it by spinning up a site with one password, then change it afterward.

It appears the issue is that WP Local is not escaping spaces in the wp-cli command. The command then fails because it looks like the parts of the password after the space are a different argument, which wp-cli does not recognize.

You’re correct, @ytfeldrawkcab, that this has been a longstanding bug. I’ve checked with the team and this is related to a special characters bug for Windows users as detailed here:

Our team does have a bug object filed in their backlog and has bumped it up the list. I know this has been around for a long time, but it has proven difficult to address, and it hasn’t received a priority since there are simple workarounds. We’ll be sure to update everyone when this is resolved, however.

1 Like