WP CLI - Windows - Error establishing a database connection

Issue Summary

I realise you can “Open site shell” on each install however I want to create a script including wp cli tasks to automate updates etc. Is there a way to allow for wp cli commands on regular Command Prompt?

I’ve read a few Mac solutions but these require Socket values which it appears Windows doesn’t have.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    All
  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes

Replication

Open command prompt, run wp core update (with wp cli tools installed)

System Details

  • Which version of Local is being used?
    6.7
  • What Operating System (OS) and OS version is being used?
    Windows 11

Hi @JDev

So your goal would be to open Local, and then open your command prompt and run updates for all the sites simultaneously?

Hi @Nick-B,

Not necessarily. Just be able to run wpcli commands without the use of the Local site shell on Windows.

The goal is to run site build, maintenance (WP updates), and visual regression testing scripts.

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