Skip to content

Instantly share code, notes, and snippets.

@czerspalace
Last active September 28, 2023 05:22
Show Gist options
  • Select an option

  • Save czerspalace/9926961a7619cf8e86e48e9627aa3583 to your computer and use it in GitHub Desktop.

Select an option

Save czerspalace/9926961a7619cf8e86e48e9627aa3583 to your computer and use it in GitHub Desktop.
Use Powershell to install wp-cli
$cliDir = "c:\wp-cli\"
mkdir $cliDir
$cliFilePath = $cliDir + "wp-cli.phar";
(New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar", $cliFilePath)
$batchFile = $cliDir + "wp.bat";
Set-Content $batchFile "@ECHO OFF","php `"c:/wp-cli/wp-cli.phar`" %*"
#Need to set path here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment