KazeWP - WordPress deployment and management tool with Docker, Caddy and bash scripts
Artificial IntelligenceDigital MarketingEmailServerWordpress

KazeWP – WordPress Deployment and Management Tool with Docker, Caddy and Bash Scripts

I introduced it a few months ago (WordPress-Caddy-Docker) A simple solution to quickly set up WordPress running on a Caddy Server using Docker Compose. This tool has been well received by many people, however it has 2 major disadvantages:

  1. Parameters need to be edited $DOMAIN in file .env before activation.
  2. Only supports setting up a single website. If you need to manage multiple WordPress websites on the same server, it is mandatory to have knowledge of Caddy and Docker to set up additional parameters accordingly.

I have shown how to configure Caddy as a Reserve Proxy for homelab at home. The same can be applied to configure many WordPress websites. However, doing it manually not only takes a lot of time but also easily leads to errors if not careful when editing the configuration.

The above difficulties and limitations motivated me to upgrade (wordpress-caddy-docker) to the new version, which supports installing multiple websites on the same server. After several weeks of research and testing with the great support of Claude AI and ChatGPT, I would like to introduce to everyone KazeWP – tools to help manage many WordPress websites easily, quickly and effectively.

I. Introducing KazeWP

KazeWP is an open source tool developed by me (with support from ChatGPT and Claude AI), helping to deploy and manage multiple WordPress websites easily on Docker and Caddy platforms.

Outstanding benefits of KazeWP:

  • Flexible expansion: You can add as many websites as you like without worrying about conflicts.
  • Supports many WordPress websites: Easily add, delete, or manage WordPress websites on the same server.
  • Integrated Reverse Proxy: Use Caddy to automatically configure SSL and network redirection.
  • Fully automatic: Automate configuration using simple Bash Script.
  • Easy to install: Everything is containerized using Docker.

II. Install KazeWP

1. Requirements:

  • The computer has it pre-installed Docker and Docker Compose.
  • Unix operating system (Linux or macOS), or WSL if using Windows.

2. Installation steps:

Download source code from Github:

git clone https://github.com/10h30/kazewp.git
cd kazewpCode language: Bash (bash)

The directory structure will be as follows, with the main executable file being kazewp.sh

.
├── kazewp.sh
├── images
│   ├── kazewp.png
├── lib
│   ├── caddy.sh
│   ├── colors.sh
│   ├── config.sh
│   ├── docker.sh
│   ├── utils.sh
│   ├── validation.sh
│   └── wordpress.sh
├── LICENSE
├── README.md
└── templates
    ├── caddy.template
    ├── docker-compose.yml.template
    └── wp-setup.sh.templateCode language: CSS (css)

Run the installation script:

Use the following command to see how to use KazeWP

./kazewp.sh
KazeWP - WordPress Site Management Script
Usage:
  ./kazewp.sh install <domain>              - Install a new WordPress site
  ./kazewp.sh list                          - List all installed WordPress sites
  ./kazewp.sh delete <domain>               - Delete a WordPress site
  ./kazewp.sh delete all                    - Delete everythingCode language: Shell Session (shell)

III. Instructions for using KazeWP

A. Install new website

To install a new WordPress website, use the following command:

./kazewp.sh install <domain>

Replace <domain>with your domain name (e.g. markknow.com). The system will ask you to enter important information to configure WordPress: Admin Email, Admin Username, Admin Password and Site Title

Enter admin email: mark@markknow.com
Enter admin username: mark
Enter password (press Enter for random password):
Generated password: wIIWfNPfXL2qiLa0
Enter site title: Mark
Do you want to (1) start services and set up WordPress automatically or (2) do it manually later? (1/2):Code language: Shell Session (shell)

You have 2 options for installation

1. Automatic activation

When choosing (1) start services and set up WordPress automaticallythe system will automatically operate from AZ: create containers, configure WordPress and connect to Caddy. You just need to wait a few minutes until you see the message below

== User List ==
(+) Creating 2/0
  Container db_mark.com         Running                                                                                                                   0.0s 
  Container wordpress_mark.com  Running                                                                                                                   0.0s 
+----+------------+--------------+-------------------+---------------------+---------------+
| ID | user_login | display_name | user_email        | user_registered     | roles         |
+----+------------+--------------+-------------------+---------------------+---------------+
| 1  | mark       | mark         | mark@markknow.com | 2025-02-03 01:24:28 | administrator |
+----+------------+--------------+-------------------+---------------------+---------------+

== Theme List ==
(+) Creating 2/0
  Container db_mark.com         Running                                                                                                                   0.0s 
  Container wordpress_mark.com  Running                                                                                                                   0.0s 
+-------------------+----------+--------+---------+----------------+-------------+
| name              | status   | update | version | update_version | auto_update |
+-------------------+----------+--------+---------+----------------+-------------+
| kadence           | active   | none   | 1.2.14  |                | off         |
| twentytwentyfive  | inactive | none   | 1.0     |                | off         |
| twentytwentyfour  | inactive | none   | 1.3     |                | off         |
| twentytwentythree | inactive | none   | 1.6     |                | off         |
+-------------------+----------+--------+---------+----------------+-------------+

== Plugin List ==
(+) Creating 2/0
  Container db_mark.com         Running                                                                                                                   0.0s 
  Container wordpress_mark.com  Running                                                                                                                   0.0s 
+--------------------+----------+--------+---------+----------------+-------------+
| name               | status   | update | version | update_version | auto_update |
+--------------------+----------+--------+---------+----------------+-------------+
| akismet            | inactive | none   | 5.3.5   |                | off         |
| cache-enabler      | active   | none   | 1.8.15  |                | off         |
| hello              | inactive | none   | 1.7.2   |                | off         |
| wordfence          | active   | none   | 8.0.1   |                | off         |
| advanced-cache.php | dropin   | none   |         |                | off         |
+--------------------+----------+--------+---------+----------------+-------------+

WordPress setup completed!
WordPress setup completed successfully
Complete setup finished successfully!

WordPress Site Information:
----------------------------------------
Domain:       https://mark.com
Admin URL:    https://mark.com/wp-admin
Username:     mark
Password:     wIIWfNPfXL2qiLa0 (SAVE THIS PASSWORD!)
Email:        mark@markknow.com
----------------------------------------

Credentials have been saved to: /root/kazewp/wordpress/mark.com/credentials.txtCode language: Shell Session (shell)

Then use your web browser to access the domain name you just set up to confirm that WordPress has been successfully installed.

2. Manual activation

You can also choose (2) do it manually laterto proactively activate the system when needed. Usually when I need advanced configuration for some special WordPress websites, I will choose this step to edit the file compose.yaml before activation.

The system will display instructions on how to activate as below

Manual setup instructions:
1. Start Caddy:
   cd /root/kazewp/caddy && docker compose up -d
Reloading Caddy configuration...
2. Start WordPress:
   cd /root/kazewp/wordpress/mark.com && docker compose up -d
3. Run the WordPress setup script:
   ./wp-setup.sh

WordPress Site Information:
----------------------------------------
Domain:       https://mark.com
Admin URL:    https://mark.com/wp-admin
Username:     mark
Password:     y8bnRF2daKjGI2Wb (SAVE THIS PASSWORD!)
Email:        mark@markknow.com
----------------------------------------

Credentials have been saved to: /root/kazewp/wordpress/mark.com/credentials.txtCode language: Shell Session (shell)

Activate Caddy

cd /root/kazewp/caddy && docker compose up -dCode language: Bash (bash)

Activate WordPress

cd /root/kazewp/wordpress/mark.com && docker compose up -dCode language: Bash (bash)

Install WordPress

./wp-setup.sh

and operate similarly to the instructions above

In both cases, the WordPress site parameters are saved in the file credentials.txt located in the directory of the newly created domain name.

To add a new website, use the command again

./kazewp.sh install <domain

and operate similar to the instructions above.

B. View the list of installed websites

To see a list of running websites, use the following command:

./kazewp.sh listCode language: PHP (php)

A list of websites and corresponding information will be displayed on the terminal.

Installed WordPress Sites:
-------------------------
Site: mark.com
Path: /root/kazewp/wordpress/mark.com
Status: No container is running
-------------------------Code language: YAML (yaml)

C. Delete website

To delete an installed website, use the command:

./kazewp.sh delete <domain>Code language: JavaScript (javascript)

Replace <domain>with the domain you want to delete. You need to confirm in the Are you sure you want to continue step? (y/N). Select Y to confirm.

Warning: This will permanently delete the site: mark.com
Are you sure you want to continue? (y/N): y
Stopping Docker containers...
Removing site directory...
Removing Caddy configuration...
Reloading Caddy...
Reloading Caddy configuration...
Site 'mark.com' has been successfully deletedCode language: JavaScript (javascript)

D. Reset from the beginning

To delete all sites and configurations, use the command

./kazewp.sh delete allCode language: JavaScript (javascript)
Are you sure you want to uninstall everything? This will stop and remove all containers, and delete files. (Y/n): YCode language: JavaScript (javascript)

All containers and folders created by this KazeWP script will be cleaned up so you can reinstall from the beginning.

IV. Conclusion

KazeWP is a powerful and convenient solution for managing multiple WordPress websites on the same server. With automation features, KazeWP will help you save time and optimize management work.

In addition to the existing features, I am planning to add new features such as backup / restore, plugin / theme installation options,…

Try using it KazeWP and share your opinion! If you have any questions or find an error when using it, please notify me in the comments section below.

Wishing you a successful installation!

Comment Policy: We truly value your comments and appreciate the time you take to share your thoughts and feedback with us.

Note: Comments that are identified as spam or purely promotional will be removed.

To enhance your commenting experience, consider creating a Gravatar account. By adding an avatar and using the same e-mail here, your comments will feature a unique and recognizable avatar, making it easier for other members to identify you.

Please use a valid e-mail address so you can receive notifications when your comments receive replies.

Related posts

What is Brainstorming? 7 Tips to Help Brainstorm Most Effectively

Mark Lee

What is Brand Architecture? 5 Most Popular Brand Architecture Models

Mark Lee

Buyer Journey: How can brands understand what users ‘think’ on their purchase journey and persuade them

Mark Lee

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More