Note: This version is currently in beta. The stable version will be released later as WP Docker is undergoing a complete refactoring of its codebase to optimize performance and scalability.
Lightweight, Flexibility & Freedom
- π Documentation
- π¦ Report a bug
- π‘ Feature request
WP Docker makes WordPress development a breeze with its easy-to-use container platform that works right from your terminal.
Designed for both beginners and pros, it gives you everything you need to run WordPress smoothly:
- Currently supports OpenResty (NGINX with Lua), MariaDB, and PHP-FPM
- Smart resource management: Automatically configures PHP-FPM and MySQL based on your computer's capabilities
- Quick setup: Gets WordPress running with just a few commands
- Built-in caching tools: Automatically configures WordPress caching with ready-to-use setups for FastCGI Cache, Redis, WP Super Cache, WP Fastest Cache, and more
- WP-CLI ready: Run
wpdocker wp cli example.ltd <command>to execute any WP-CLI command directly inside your container - Enjoy flexible usage through a friendly terminal interface or the convenient
wpdockercommand lineβwhichever works best for you! - Safe and secure, as WP Docker uses only official Docker images that are regularly updated (except for OpenResty, which uses my custom-built image to support Brotli compression and the
ngx_cache_purgemodule)
Soon you'll be able to switch between different web servers like OpenResty or Caddy without changing your workflow. This exciting feature is coming in a future update, with the system automatically handling all configuration changes for you.
WP Docker adopts infrastructure-as-code principles to give you complete freedom, so you're never locked into one provider. Your entire WordPress setupβincluding Linux, PHP, and databaseβruns in containers that you can move anywhere. In the near future, WP Docker will introduce a powerful migration feature that lets you transfer your complete setup to a different server quickly and automaticallyβgiving you true portability and freedom to host your WordPress sites wherever you want!
As an open-source project released under the MIT license, you're free to use, modify, and distribute WP Docker for any purpose, whether personal or commercial.
Built to be simple, friendly, and flexible, WP Docker works perfectly on both Mac and Linux computers. Why not give it a try?
- It is recommended to have Docker and the Docker Compose plugin installed before install WP Docker
- Git (for installation and updates)
- Bash 3.0+ (pre-installed on most Linux distributions and macOS), but Bash 4.0 or later is recommended.
- At least 1GB of RAM per WordPress site (recommended)
Docker on macOS cannot access folders outside the shared file system list.
After installation, you must add /opt to Docker β Settings β Resources β File Sharing:
Docker File Sharing Documentation
curl -fsSL https://raw.githubusercontent.com/thachpn165/wp-docker/refs/heads/main/src/install.sh -o install.sh && bash -i install.shOnce installed, simply run:
wpdocker menuThis command opens the interactive terminal menu for managing your WordPress sites.
You can also use WP Docker through the wpdocker command. For more information, refer to the instructions with the wpdocker --help command.
Release date: 2025-04-25
-
PHP Extension Management
- Added
php_install_extensions.shto support installing PHP extensions (e.g., Ioncube Loader). - Enabled
imagickby default in PHP config. - New menu and CLI interface to handle extension installation.
- Added
-
New Bashly CLI
- Introduced Bashly-powered
wpdockerCLI with structured commands and auto-completion. - Deprecated individual
*.shwrappers.
- Introduced Bashly-powered
-
WordPress Backup Scheduler
- Created backup cron system with cleaner interface and upload support via Rclone.
-
OpenResty Upgrade
- Switched to
thachpn165/wpdocker-openrestyDocker image. - Added Brotli and
ngx_cache_purgesupport.
- Switched to
-
SSL Auto-Renewal
- Integrated certbot renewal using Docker container and cron runner.
- Renewal logs saved per site.
-
Domain Validation + Safe Curl
- Added
_is_missing_param,safe_curl, and domain validation logic. - Improved parameter checking across scripts.
- Added
-
Cache Management Enhancements
- Improved NGINX rules and compatibility with WP Fastest Cache + Redis.
- Auto-detects optimal cache settings per site.
- Rclone setup prompt translation (vi).
- Refined error messages and exit handling in scripts.
- Consistent use of
print_msg,debug_log, andget_input_or_test_value.
- Refactored all CLI menus to support i18n.
- Updated php.ini template logic for extension inclusion.
- Centralized site configurations under
.config.json.
For complete changelog history, please see CHANGELOG.md
- Create and manage multiple WordPress installations simultaneously
- Configure PHP versions and its configurations for individual sites
- Restore WordPress source code and database from backup interactively
- Automatic SSL certificate deployment (Let's Encrypt, custom, or self-signed)
- Isolated container environments for enhanced security
- Intergrated firewall configurations through NGINX
- Execute comprehensive backup solutions with cloud integration (via Rclone)
- Schedule automated periodic backups through cron functionality
- Easy to restore website data from backup
- Directly modify configuration files including
php.iniandphp-fpm.conf - Performance optimization tools for NGINX and PHP-FPM
- Full multilingual support (i18n) for CLI prompts and messages
- Perform complete site removal including containers, files, and SSL certificates
- Update Docker images and system components
- Access container shells for advanced troubleshooting
- Enable global Debug Mode to show internal commands and logs
- Enable Dev Mode to preview unreleased, under-development features
For advanced users requiring custom configurations, the following files can be modified:
config/nginx/: NGINX configuration templatesconfig/php/: PHP version-specific configurationsconfig/mysql/: MySQL server settings
After modifying configuration files, restart the affected services through the system menu.
The stable version will be released later as WP Docker is undergoing a complete refactoring of its codebase to optimize performance and scalability.
- Create WordPress websites with Docker
- PHP version management (ARM compatibility warning included)
- SSL certificate management (self-signed, Let's Encrypt, manual)
- Backup system (local + Rclone support)
- Scheduled automated backups
- Website restoration (source + database)
- Integrated firewall configurations through NGINX
- Auto-update WP-CLI and system version checker
- Clean command-line interface optimized for macOS and Linux
- Automatic WordPress Migration (restore data from existing WordPress website in "one-shot")
- Focus on stabilizing core feature functionalities
- Add new features: Telegram notification, Fail2ban integration
- Support configuration for WordPress Multisite
- Refactor to support multiple web servers
- Integrate additional web servers: Caddy Server, OpenLiteSpeed
- Cluster support using Docker Swarm
- Fork the repository to your personal GitHub account
- Create a feature branch from the
mainbranch - Implement your changes, commit them with descriptive messages, and submit a pull request
- For comprehensive contribution procedures, please consult our CONTRIBUTING.md documentation
- For bugs or feature requests, please open an issue in the GitHub repository
- Include detailed information about your environment and steps to reproduce any bugs
This project is licensed under the MIT License.
- DannyBen/bashly (MIT license)
- rclone (MIT license)
I would like to extend my sincere appreciation to @sonpython for his valuable contributions to this project. My heartfelt thanks also go to my colleagues at AZDIGI: @dotrungquan , @BamBo355 , @phongdh262, and @RakunFatalis for their unwavering support throughout the development process.
Furthermore, I am grateful for the innovative AI tools ChatGPT and Cursor, which significantly enhanced the efficiency and quality of this project.