Skip to content

Instantly share code, notes, and snippets.

@devkabir
devkabir / install-wpcli.ps1
Created September 2, 2024 03:10
Install WP Cli on windows
# PowerShell Script to Install WP-CLI on Windows
# Step 1: Download WP-CLI Phar file
$wpcli_url = "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
$destination = "C:\wp-cli\wp-cli.phar"
# Create directory if it doesn't exist
if (!(Test-Path "C:\wp-cli")) {
New-Item -ItemType Directory -Path "C:\wp-cli"
}