Skip to content

Commit cc78e7b

Browse files
committed
feat: add initial project documentation for PXP CLI tool
1 parent 364b887 commit cc78e7b

1 file changed

Lines changed: 176 additions & 0 deletions

File tree

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
---
2+
title: "pxp - PHP Version Switcher for XAMPP"
3+
slug: "pxp-cli"
4+
description: "A simple yet powerful CLI tool to manage multiple PHP versions in XAMPP on Windows. Switch between PHP versions instantly with automatic Apache configuration."
5+
image: "https://pphat.me/assets/projects/pxp-cli/cover.webp"
6+
tags: ["CLI", "PHP", "XAMPP", "Developer Tools"]
7+
languages: ["PowerShell", "Batchfile", ".NET"]
8+
source:
9+
-
10+
name: "source"
11+
type: "source"
12+
url: "https://github.com/pphatdev/pxp-cli"
13+
-
14+
name: "releases"
15+
type: "demo"
16+
url: "https://github.com/pphatdev/pxp-cli/releases"
17+
18+
authors:
19+
-
20+
name: "PPhat Dev"
21+
profile: "https://github.com/pphatdev.png"
22+
url: "https://github.com/pphatdev"
23+
24+
published: true
25+
createdAt: "2026-03-15T10:12:15.648Z"
26+
---
27+
28+
<div class="blog-gallery" data-layout="snap" data-captions="true">
29+
<img src="https://pphat.me/assets/projects/pxp-cli/demo-1.webp" alt="CLI Terminal" className=""/>
30+
</div>
31+
32+
---
33+
34+
# ✨ **About Project**
35+
36+
PXP (Personal XAMPP PHP) is a simple yet powerful CLI tool to manage multiple PHP versions in XAMPP on Windows.
37+
Built for developers who need to test their applications across different PHP versions, PXP makes version switching effortless.
38+
With just a single command, you can switch between PHP 7.x and 8.x versions, download new versions automatically, and manage your PHP installations safely.
39+
The tool handles all the complexity of Apache configuration updates, module naming conventions, and service management, ensuring smooth transitions between versions.
40+
41+
# πŸ› οΈ **Project Tech Stack**
42+
43+
- **Core:**
44+
- PowerShell `5.1+`
45+
- Windows Batch Files
46+
- .NET SDK `6.0+` (for MSI installer)
47+
48+
- **Dependencies:**
49+
- XAMPP (Windows)
50+
- Windows `10/11`
51+
- Apache `2.4`
52+
53+
- **Distribution:**
54+
- MSI Installer (WiX Toolset)
55+
- GitHub Releases
56+
- Manual Installation
57+
58+
# 🌈 **Project Features**
59+
60+
- πŸ”„ **Instant Version Switching** - Switch between PHP versions with a single command
61+
- πŸ“¦ **Automatic Downloads** - Install new PHP versions directly from windows.php.net
62+
- πŸ—‘οΈ **Safe Uninstall** - Remove PHP versions with confirmation and validation
63+
- πŸ“‹ **Version Listing** - View all installed PHP versions with active version indicator
64+
- 🌐 **Global PHP Discovery** - Fetch available stable PHP versions from PHP.net
65+
- ⚑ **Auto Apache Config** - Automatic Apache configuration and module updates
66+
- πŸ›‘οΈ **Safe Backups** - Automatic backups before switching versions
67+
- πŸš€ **Service Management** - Automatic Apache stop/start during version switching
68+
- πŸ“¦ **MSI Installer** - Easy installation with automatic PATH configuration
69+
- πŸ”§ **Git Bash Support** - Compatible with Windows terminals and Git Bash
70+
71+
# πŸ’» **Key Commands**
72+
73+
Here are the main commands available in PXP:
74+
75+
## Version Management
76+
77+
```bash
78+
# Show PXP version
79+
pxp -v
80+
81+
# List installed PHP versions
82+
pxp list
83+
84+
# Show current active PHP version
85+
pxp current
86+
87+
# Switch to a different PHP version
88+
pxp switch 8.3.15
89+
90+
# List all available PHP versions globally
91+
pxp list -php -global
92+
```
93+
94+
## Installation & Uninstallation
95+
96+
```bash
97+
# Download and install a new PHP version
98+
pxp install 8.3.6
99+
100+
# Uninstall a PHP version
101+
pxp uninstall 8.0.30
102+
103+
# Get help
104+
pxp help
105+
```
106+
107+
## How It Works
108+
109+
| Component | Description |
110+
|-----------|-------------|
111+
| **Directories** | PHP versions are stored as `C:\xampp\php{version}\`. The active one is always `C:\xampp\php\`. |
112+
| **Apache Config** | `httpd-xampp.conf` is updated to load the correct `php7apache2_4.dll` or `php8apache2_4.dll`. |
113+
| **Module Name** | PHP 7.x uses `php7_module`, PHP 8.x uses `php_module` (XAMPP convention). |
114+
| **Backup** | A backup of `httpd-xampp.conf.bak` is created on first switch. |
115+
| **Services** | Apache is automatically stopped before switching and restarted after configuration updates. |
116+
117+
# 🎯 **Installation**
118+
119+
## Option 1: MSI Installer (Recommended)
120+
121+
Download the latest MSI installer from [GitHub Releases](https://github.com/pphatdev/pxp-cli/releases) and run it. The installer will automatically add `pxp` to your PATH.
122+
123+
## Option 2: Manual Installation
124+
125+
1. Clone the repository:
126+
```bash
127+
git clone https://github.com/pphatdev/pxp-cli.git
128+
```
129+
130+
2. Add the folder to your system PATH:
131+
- Settings β†’ System β†’ About β†’ Advanced system settings
132+
- Environment Variables β†’ Path β†’ New
133+
- Add the full path to where you cloned/extracted the files
134+
135+
3. Open a new terminal and run:
136+
```bash
137+
pxp help
138+
```
139+
140+
# πŸ“š **Documentation**
141+
142+
- πŸ“˜ [README](https://github.com/pphatdev/pxp-cli/blob/master/README.md) - Getting started and basic usage
143+
- πŸ”§ [Troubleshooting Guide](https://github.com/pphatdev/pxp-cli/blob/master/docs/TROUBLESHOOTING.md) - Common issues and solutions
144+
- 🀝 [Contributing Guide](https://github.com/pphatdev/pxp-cli/blob/master/CONTRIBUTING.md) - How to contribute
145+
- πŸ‘¨β€πŸ’» [Development Guide](https://github.com/pphatdev/pxp-cli/blob/master/docs/DEVELOPMENT.md) - Technical documentation
146+
- πŸ”’ [Security Policy](https://github.com/pphatdev/pxp-cli/blob/master/SECURITY.md) - Security best practices
147+
- πŸ“ [Changelog](https://github.com/pphatdev/pxp-cli/blob/master/CHANGELOG.md) - Version history
148+
149+
# πŸ”§ **Requirements**
150+
151+
- Windows 10/11 - Required for PowerShell support
152+
- XAMPP - Installed at `C:\xampp` (default location)
153+
- PowerShell 5.1+ - Pre-installed on Windows 10/11
154+
- .NET SDK 6.0+ - Only needed for building the MSI installer
155+
156+
# 🀝 **Contributing**
157+
158+
Contributions are welcome! Here's how you can help:
159+
160+
- πŸ› Report bugs - [Open an issue](https://github.com/pphatdev/pxp-cli/issues/new/choose)
161+
- πŸ’‘ Suggest features - [Request a feature](https://github.com/pphatdev/pxp-cli/issues/new/choose)
162+
- πŸ”€ Submit pull requests - [Read the contributing guide](https://github.com/pphatdev/pxp-cli/blob/master/CONTRIBUTING.md)
163+
- πŸ“ Improve documentation - Help make docs better
164+
- ⭐ Star the repository - Show your support
165+
166+
# πŸ“„ **License**
167+
168+
MIT Β© [pphatdev](https://github.com/pphatdev)
169+
170+
Made with 😧 to resolve PHP version switching issues
171+
172+
---
173+
174+
**Version:** 1.3.1
175+
**Last Updated:** March 2026
176+
**GitHub:** [pphatdev/pxp-cli](https://github.com/pphatdev/pxp-cli)

0 commit comments

Comments
Β (0)