A modern, cross-platform PHP version manager with an intuitive graphical interface
Built with Rust for memory safety, performance, and low resource usage
PHP Version Manager (phpvm) is a cross-platform tool that simplifies managing multiple PHP versions on your system. Whether you're a developer switching between PHP versions for different projects or a system administrator managing PHP installations, phpvm provides a modern, user-friendly solution.
- π¨ Modern GUI: Clean, intuitive interface built with Tauri and React
- β‘ Fast & Lightweight: Native performance with minimal resource footprint
- π Memory Safe: Built with Rust for security and reliability
- π Cross-Platform: Works seamlessly on Windows and Linux
- π Automatic PATH Management: Seamless version switching with automatic system PATH updates
- π¦ Smart Caching: Efficient download caching with checksum verification
- π Secure: Atomic operations with rollback support and checksum verification
- π₯ Install PHP Versions: Download and install multiple PHP versions from official sources
- π Version Switching: Easily switch between installed PHP versions with a single click
- ποΈ Version Management: Remove unused versions to free up disk space
- π Version Discovery: Browse available PHP versions across different releases
- π Version Status: View detailed information about installed and active versions
- π Tabbed Interface: Organized views for Installed Versions, Available Versions, Cache, and Settings
- π Progress Tracking: Real-time progress indicators for downloads and installations
- π Notifications: Clear feedback for all operations, successes, and errors
- π¨ Modern Design: Clean, responsive interface with smooth animations
- πΎ Cache Management: View and manage downloaded PHP archives with efficient caching
- π§ Settings: Configure installation paths, cache location, and update preferences
- π Auto-Updates: Automatic update checking and one-click updates (when available)
- π Thread-Safe Variants: Support for both Thread-Safe (TS) and Non-Thread-Safe (NTS) PHP builds on Windows
- β Checksum Verification: All downloads are verified for integrity
- π Atomic Operations: Installations are atomic with rollback support
- π€ User-Scoped: No silent privilege escalation required
- π‘οΈ Memory Safe: Built with Rust for enhanced security
Two installer options are available from the Releases page:
-
MSI Installer (
*.msi)- Recommended for enterprise deployments
- Supports silent installation
- Integrates with Windows Installer service
-
Setup Executable (
*-setup.exe)- User-friendly installation wizard
- Includes automatic dependency checks
- Standard Windows installer experience
- AppImage: Download the
.AppImagefile, make it executable (chmod +x), and run it - Debian/Ubuntu: Install the
.debpackage withsudo dpkg -i *.deb - Fedora/RHEL: Install the
.rpmpackage withsudo rpm -i *.rpmorsudo dnf install *.rpm
Required:
- Rust (Cargo) - Latest stable version (Install Rust)
- Node.js and npm - Version 18+ (Install Node.js)
- Platform-specific build tools:
- Windows: Visual Studio Build Tools with C++ workload
- Linux: Build essentials and WebKit/GTK development libraries
Windows (PowerShell):
# Development build (faster, opens automatically)
.\build-dev.ps1
# Production build
.\build.ps1Windows (CMD):
build-dev.bat
build.batLinux/macOS:
# Development build
chmod +x build-dev.sh
./build-dev.sh
# Production build
chmod +x build.sh
./build.sh-
Build Core Library:
cd phpvm-core cargo build --release -
Build GUI:
cd phpvm-gui npm install npm run tauri build -
Run Application:
- Windows:
phpvm-gui\src-tauri\target\release\phpvm-gui.exe - Linux:
phpvm-gui/src-tauri/target/release/phpvm-gui - macOS:
phpvm-gui/src-tauri/target/release/bundle/macos/PHP Version Manager.app
- Windows:
- Launch PHP Version Manager
- Open the "Available Versions" tab
- Select a PHP version from the list
- Click "Install" and wait for the download and installation to complete
- Go to the "Installed Versions" tab
- Find your desired version in the list
- Click "Set Active" on the version you want to use
- The system PATH will be updated automatically
- Remove Versions: Click "Remove" on any installed version to delete it
- View Cache: Check the "Cache" tab to see downloaded archives
- Clear Cache: Remove cached downloads to free up disk space
- Configure Settings: Adjust paths and preferences in the "Settings" tab
php-version-manager/
βββ phpvm-core/ # Core library (Rust)
β βββ src/
β β βββ config.rs # Configuration management
β β βββ download.rs # Download and caching
β β βββ install.rs # Installation logic
β β βββ manager.rs # Main PHP manager interface
β β βββ platform.rs # OS-specific operations (PATH management)
β β βββ provider.rs # PHP version provider/API
β β βββ state.rs # State management
β β βββ version.rs # Version parsing and handling
β βββ Cargo.toml
βββ phpvm-gui/ # Graphical user interface
β βββ src/ # React frontend
β β βββ components/ # UI components
β β βββ hooks/ # React hooks
β β βββ services/ # API services
β β βββ styles/ # CSS stylesheets
β βββ src-tauri/ # Tauri backend (Rust)
β β βββ src/
β β β βββ commands.rs # Tauri command handlers
β β β βββ main.rs # Application entry point
β β β βββ update.rs # Auto-update functionality
β β βββ tauri.conf.json
β βββ package.json
βββ build.sh # Build script (Linux/macOS)
βββ build.ps1 # Build script (Windows PowerShell)
βββ build.bat # Build script (Windows CMD)
The project uses a modular architecture with clear separation between core logic and user interface:
-
phpvm-core: Contains all business logic for managing PHP versions- Platform-independent core operations
- Platform-specific implementations for Windows and Linux
- No UI dependencies
-
phpvm-gui: Provides the graphical user interface- React frontend for UI rendering
- Tauri backend that directly uses
phpvm-core - Communication via Tauri commands
Benefits:
- β No code duplication: All PHP management logic is centralized
- β Maintainability: Changes to core logic are isolated
- β Testability: Core library can be tested independently
- β Future CLI: Core library can be reused for a future CLI tool
Main interface for all PHP operations:
- Install/remove PHP versions
- Switch between versions
- List installed and available versions
- Manage cache
Handles the complete installation process:
- Download verification
- Archive extraction
- File installation
- PATH management
Manages downloads with:
- Efficient caching
- Checksum verification
- Progress reporting
- Resume support
Tracks application state:
- Installed versions
- Active version
- Configuration settings
- OS: Windows 10 or later (64-bit)
- Privileges: Administrator privileges for installation (optional for user-scoped installs)
- Network: Internet connection for downloading PHP versions
- Disk Space: ~500MB per PHP version (plus cache space)
- OS: Linux distribution with GTK 3.0+ and WebKitGTK support
- Network: Internet connection for downloading PHP versions
- Disk Space: ~500MB per PHP version (plus cache space)
- Web Developers: Switch between PHP versions for different projects
- System Administrators: Manage PHP installations across multiple environments
- CI/CD: Use in automated build pipelines
- Testing: Test applications against multiple PHP versions
- Learning: Experiment with different PHP versions and features
PHP Version Manager stores configuration in:
- Windows:
%APPDATA%\phpvm\config.json - Linux:
~/.config/phpvm/config.json
Default installation paths:
- Windows:
%LOCALAPPDATA%\phpvm\versions\ - Linux:
~/.local/share/phpvm/versions/
These can be configured through the Settings tab in the application.
Problem: PHP version fails to install
- Solution: Check internet connection and available disk space
- Solution: Verify checksums are valid (check logs)
Problem: PATH not updating after switching versions
- Solution: Restart your terminal/command prompt
- Solution: On Windows, restart the application with administrator privileges if needed
Problem: Build fails with missing dependencies
- Solution: Ensure all prerequisites are installed (see Prerequisites section)
- Solution: On Linux, install all required development libraries
- Solution: On Windows, ensure Visual Studio Build Tools are installed with C++ workload
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Tauri for the GUI framework
- Powered by Rust for the core logic
- UI built with React and modern web technologies
- Issues: GitHub Issues
- Releases: GitHub Releases
Made with β€οΈ using Rust and modern web technologies