Skip to content

A lightweight PHP script that automatically downloads and extracts the latest WordPress (Persian or English) version supporting both CLI and Web modes.

License

Notifications You must be signed in to change notification settings

BaseMax/wordpress-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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=fa or --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

  1. Asks the user which language of WordPress to install

  2. Downloads the ZIP file:

    • Persian β†’ https://fa.wordpress.org/latest-fa_IR.zip
    • English β†’ https://wordpress.org/latest.zip
  3. Extracts it automatically (if ZipArchive exists)

  4. WordPress is ready in the current directory (wordpress/ folder)


βš™οΈ Requirements

  • PHP 7.4+
  • cURL extension enabled
  • (Optional) ZipArchive extension for automatic extraction

πŸ“„ License

MIT License Copyright (c) 2025


πŸ’¬ Author

Seyyed Ali Mohammadiyeh (Max Base) 🌐 https://github.com/BaseMax

About

A lightweight PHP script that automatically downloads and extracts the latest WordPress (Persian or English) version supporting both CLI and Web modes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages