Deploy WordPress plugins from your terminal to any WordPress site instantly.
A simple CLI tool to deploy local WordPress plugins to remote WordPress sites. No FTP, no cPanel — just plugship deploy.
- 🚀 One-command deploys —
plugship deployand you're done - 🔐 Secure — uses WordPress Application Passwords (not your main password)
- 🎯 Multi-site — configure once, deploy to staging/production/any site
- 📦 Smart packaging — auto-excludes dev files (node_modules, tests, src, etc.)
- 🔄 Auto-updates — replaces existing plugins automatically
- 🌐 No server access needed — works entirely via WordPress REST API
- Added interactive site picker for
plugship sites remove. - Added interactive site picker for
plugship sites set-default. - Added automatic
.gitignoreupdates after successful deploy forbuild/andbuilds/. - Fixed dry-run ZIP size reporting.
See full history in CHANGELOG.md.
npm install -g plugshipplugship --versionThe plugship-receiver plugin must be installed on your WordPress site first. It adds secure REST endpoints to receive plugin uploads.
Download plugship-receiver.zip →
- Go to Plugins > Add New > Upload Plugin in WordPress admin
- Upload
plugship-receiver.zip - Activate PlugShip Receiver
- Go to Users > Profile in WordPress admin
- Scroll to Application Passwords
- Enter "plugship" as the name
- Click Add New Application Password
- Copy the generated password (you'll need it in the next step)
Learn more about Application Passwords →
plugship initYou'll be prompted for:
- Site alias — a short name like "production" or "staging"
- WordPress site URL — e.g.,
https://example.com - Admin username — your WordPress admin username
- Application Password — paste the password from Step 2
Navigate to your WordPress plugin directory:
cd my-awesome-plugin/
plugship deploy✅ Done! Your plugin is deployed and activated on the remote site.
Deploy the plugin from the current directory.
# Deploy to default site
plugship deploy
# Deploy to a specific site
plugship deploy --site staging
# Deploy to all configured sites
plugship deploy --all
# Preview what would be deployed (no upload)
plugship deploy --dry-run
# Deploy without activating the plugin
plugship deploy --no-activateWhat happens:
- Detects your plugin from PHP headers
- Creates a ZIP excluding dev files
- Uploads to the WordPress site
- Installs/updates the plugin
- Activates it (unless
--no-activate)
Add a new WordPress site to your configuration.
plugship initInteractive prompts guide you through:
- Site alias
- URL
- Username
- Application Password
The CLI automatically tests the connection and verifies the receiver plugin is active.
Check if a site is ready for deployment.
# Check default site
plugship status
# Check a specific site
plugship status --site stagingVerifies:
- ✅ REST API is accessible
- ✅ Credentials are valid
- ✅ User has
install_pluginscapability - ✅ Receiver plugin is active
Manage your saved sites.
# List all configured sites
plugship sites list
# Set the default site
plugship sites set-default production
# Set default using interactive picker
plugship sites set-default
# Remove a site by name
plugship sites remove staging
# Remove a site using interactive picker
plugship sites removeManage file exclusions for deployment. NB: If you have already build ignore file like .distignore then it will use it by default.
# Create .plugshipignore with default template
plugship ignore
# Add specific patterns
plugship ignore "src/**" "*.map" "composer.json"Creates a .plugshipignore file in your plugin directory. Example:
# .plugshipignore
src/**
*.map
webpack.config.js
package.json
package-lock.json
composer.json
Already excluded by default:
node_modules, .git, .env, *.log, .vscode, .idea, tests, .github, build
Configure multiple environments:
plugship init # Add production
plugship init # Add staging
plugship init # Add local test siteDeploy to each:
plugship deploy --site staging # Test on staging first
plugship deploy --site production # Then push to prodOr deploy everywhere at once:
plugship deploy --allSee what would be deployed without uploading:
plugship deploy --dry-runOutput shows:
- Plugin name, version, slug
- ZIP file size
- Target site(s)
- Activation setting
Auto-suggest on first deploy, or create manually:
plugship ignoreEdit .plugshipignore to add project-specific exclusions:
# Custom exclusions
assets/src/**
*.scss
*.ts
tsconfig.json
┌──────────────┐
│ Your Plugin │
│ Directory │
└──────┬───────┘
│
│ plugship deploy
▼
┌──────────────┐
│ ZIP File │ (excludes dev files)
└──────┬───────┘
│
│ Upload via REST API
▼
┌──────────────────────┐
│ WordPress Site │
│ (plugship-receiver) │
└──────┬───────────────┘
│
│ Install/Update
▼
┌──────────────┐
│ Plugin │
│ Active! │
└──────────────┘
The plugship-receiver plugin adds two REST endpoints:
GET /wp-json/plugship/v1/status— Health checkPOST /wp-json/plugship/v1/deploy— Accept plugin ZIP upload
WordPress's native Plugin_Upgrader with overwrite_package => true handles installation. Existing plugins are replaced automatically.
Config file: ~/.plugship/config.json
{
"defaultSite": "production",
"sites": {
"production": {
"url": "https://example.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx"
},
"staging": {
"url": "https://staging.example.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx"
}
}
}File permissions: 0600 (only you can read/write)
- ✅ Application Passwords only — never uses your main WordPress password
- ✅ Local storage — credentials stored in
~/.plugship/config.jsonwith restricted permissions - ✅ Capability checks — only users with
install_pluginscan deploy - ✅ ZIP validation — receiver plugin validates MIME type and ZIP integrity
- ✅ Path traversal protection — rejects ZIPs with malicious entries
- ✅ 50 MB upload limit — prevents abuse
- Node.js 18 or higher
- WordPress 5.8 or higher
- Admin account with Application Passwords enabled
Problem: The plugship-receiver plugin isn't active on your WordPress site.
Solution:
- Download: https://github.com/shamim0902/plugship-receiver/releases/latest/download/plugship-receiver.zip
- Upload via Plugins > Add New > Upload Plugin
- Activate PlugShip Receiver
- Run
plugship statusto verify
Problem: Your Application Password is incorrect or expired.
Solution:
- Go to Users > Profile in WordPress admin
- Delete the old Application Password
- Create a new one
- Run
plugship initagain and paste the new password
Problem: The WordPress REST API isn't accessible.
Solution:
- Check that
https://yoursite.com/wp-json/loads in your browser - Temporarily disable security plugins (Wordfence, iThemes, etc.)
- Check hosting firewall rules
- Verify mod_rewrite is enabled (permalinks must work)
Problem: User doesn't have install_plugins capability.
Solution:
- Ensure you're using an Administrator account
- Other roles (Editor, Author, etc.) can't install plugins
PlugShip detects your plugin by scanning .php files in the current directory for WordPress plugin headers:
<?php
/**
* Plugin Name: My Awesome Plugin
* Version: 1.0.0
* Text Domain: my-awesome-plugin
*/- The
Text Domainis used as the plugin slug - If no
Text Domainis found, the slug is derived from the plugin name - Version is read from the header and displayed during deploy
- npm package: https://www.npmjs.com/package/plugship
- Receiver plugin: https://github.com/shamim0902/plugship-receiver
- Report issues: https://github.com/shamim0902/plugship/issues
MIT © shamim0902
Contributions are welcome! Please open an issue or PR.
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
Made with ❤️ for the WordPress community