BaseMax / wordpress-installer
A lightweight PHP script that automatically downloads and extracts the latest WordPress (Persian or English) version supporting both CLI and Web modes.
README
WordPress Installer
A lightweight PHP script that automatically downloads and extracts the latest WordPress (Persian or English) version supporting both CLI and Web modes.
🌍 Features
- 🖥️ Web Mode: Simple form to select language and install via browser
- 💻 CLI Mode: Interactive or flag-based setup (
--lang=faor--lang=en) - 📦 Automatically downloads the latest ZIP package
- 🧩 Auto-extracts using
ZipArchive(if available) - ⚡ Works on all PHP environments (Linux, Windows, macOS)
- 🔄 Cleans up old installations before extracting new files
🚀 Usage
CLI Mode
Run the installer from terminal:
php wordpress-installer.php --lang=fa
# or
php wordpress-installer.php
If you don’t pass a flag, it will ask interactively:
Which language do you want? [fa/en]:
Web Mode
Place the file on your server and open it in your browser:
http://localhost/wordpress-installer.php
Select your desired language (فارسی or English) and click Install.
🧠 How It Works
-
Asks the user which language of WordPress to install
-
Downloads the ZIP file:
- Persian →
https://fa.wordpress.org/latest-fa_IR.zip - English →
https://wordpress.org/latest.zip
- Persian →
-
Extracts it automatically (if
ZipArchiveexists) -
WordPress is ready in the current directory (
wordpress/folder)
⚙️ Requirements
- PHP 7.4+
cURLextension enabled- (Optional)
ZipArchiveextension for automatic extraction
📄 License
MIT License
Copyright (c) 2025
💬 Author
Seyyed Ali Mohammadiyeh (Max Base)
🌐 https://github.com/BaseMax
KiloClaw - Managed 🦀 