Last active
September 28, 2023 05:22
-
-
Save czerspalace/9926961a7619cf8e86e48e9627aa3583 to your computer and use it in GitHub Desktop.
Use Powershell to install wp-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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