Are you tierd of selecting the plugin files and create a zip file manually everytime you want to realease or test your plugin on local/live environments? WordPress Plugin Packager is a smart batch script that automatically packages your WordPress plugins into distribution-ready ZIP files and exclusion management.
- 🚀 One-Click Packaging - Bundle your plugin with a single command
- 📦 No Root Folder - Files are added directly to the ZIP (WordPress.org ready)
- 🎯 Smart Exclusions - Automatically excludes dev files with validation
- 💾 Persistent Configuration - Saves settings in
packager.config - 🔄 Version Auto-Detection - Reads plugin name and version from your main PHP file
- 🎨 Interactive Setup - First-run wizard guides you through configuration
- ⚙️ Settings Management - Easy reconfiguration through built-in menu
- Windows OS
- PowerShell (pre-installed on Windows)
- A WordPress plugin with proper headers
Download Compiler.bat and place it in your plugin's root directory:
your-plugin/
├── your-plugin.php (main plugin file)
├── Compiler.bat (this script)
├── includes/
├── assets/
└── ...
Double-click Compiler.bat. The script will guide you through setup:
Step 1: Enter your main plugin file name
Main Plugin File: your-plugin.php
Step 2: Add files/folders to exclude (optional)
File/Folder: .gitignore
✓ SUCCESS: File found and added
File/Folder: tests
✓ SUCCESS: Folder found and added
Add more exclusions? (Y/N): N
From the main menu, select option 1 to create your ZIP:
=========================================================
WP PLUGIN PACKAGER - MAIN MENU
=========================================================
1. Bundle Plugin
2. Settings (Reconfigure)
3. Version in filename: [OFF] (Toggle ON)
4. Exit
Select an option (1-3): 1
Your versioned ZIP will be created in the dist folder!
| Option | Description |
|---|---|
| 1. Bundle Plugin | Creates a versioned ZIP file in the dist folder |
| 2. Settings | Reconfigure main file and exclusions |
| 3. Version in filename | Include version in zip file name |
| 4. Exit | Close the packager |
The following files/folders are always excluded:
.git.gitignore.svnnode_modulesdistBuild.batbuild.batpackager.config
dist/
└── my-awesome-plugin.1.2.5.zip
Inside the ZIP, files are at root level (no parent folder):
my-awesome-plugin.1.2.5.zip
├── my-awesome-plugin.php
├── readme.txt
├── includes/
└── assets/
- Reads Plugin Headers - Extracts plugin name and version from your main PHP file
- Validates Files - Checks that files you want to exclude actually exist
- Creates Temp Folder - Copies all files except exclusions to
_temp_package - Generates ZIP - Compresses files directly (no root folder) with version number
- Cleans Up - Removes temporary files automatically
Error: "ZIP FAILED: File is locked"
- Close VS Code, Local, or any other program using plugin files
- Try again after closing editors
Error: "Plugin Name not found in header"
- Ensure your main PHP file has proper WordPress plugin headers:
/**
* Plugin Name: My Awesome Plugin
* Version: 1.0.0
*/- 🐧 Linux version (Bash script)
- 🍎 macOS version (Bash script)
- 📝 Custom output directory
- 🔍 Dry-run mode (preview before packaging)
- 📊 Compression statistics
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
💙 Made with love by Kasra Falahati
🏢 Proudly sponsored by Agenzia Magma
If you find this tool helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting issues
- 💡 Suggesting features
- 🤝 Contributing code
- ☕ Buying me a coffee
Last Updated: November 4, 2025