https://github.com/brucewind/wordpress-multiple-services-in-one
🛳️ Manage multiple WordPress instances on a single computer with flexible multi-port configuration.
https://github.com/brucewind/wordpress-multiple-services-in-one
Last synced: 2 months ago
JSON representation
🛳️ Manage multiple WordPress instances on a single computer with flexible multi-port configuration.
- Host: GitHub
- URL: https://github.com/brucewind/wordpress-multiple-services-in-one
- Owner: BruceWind
- License: mit
- Created: 2023-12-30T07:13:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-08T02:06:41.000Z (over 2 years ago)
- Last Synced: 2025-03-22T00:44:23.139Z (about 1 year ago)
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[中文](/README_zh.md) | [English](/README.md)
# wordpress-multiple-services-in-one
🛳️ Manage multiple WordPress instances on a single computer with flexible multi-port configuration.
## Prerequisites
- Docker: [Install Docker](https://docs.docker.com/get-docker/)
- Docker Compose: [Install Docker Compose](https://docs.docker.com/compose/install/)
## Usage
``` shell
## Clone this repository to your local machine:
git clone git@github.com:BruceWind/wordpress-multiple-services-in-one.git
## below is example, you can change the target directory name.
cp wordpress-multiple-services-in-on/ wordpress-multiple-services-in-one-service-1/
cp wordpress-multiple-services-in-on/ wordpress-multiple-services-in-one-service-2
# Navigate to each copied directory:
cd wordpress-multiple-services-in-one-service-1
## use nano or vis to change port mapping.
vi docker-compose.yml
# and then, change 8001:80 to any port you want.
# Start each service command:
docker-compose up -d
# after that, you can see the service is running.
```
It is important to modify the docker-compose.yml file:
Adjust the desired HTTP port mapping for each service.
Access each WordPress instance:
Open your web browser and visit http://localhost:{your-port} where is the HTTP port you specified for each WordPress service.
## How it works:
After you start a instance of wordpress. You only expose one http port. The DB container doesn't need to expose to a port. This is because Wordpress connect db via internal docker network.
As a result, It is not only isolated, but also safe.
## How much memory does it take?
As I tested, it takes 300 to 500MB memory for wordpress + Mysql. It is not a big deal for a modern computer
## How to expose these port to public?
As far as I’m concerned, some CDN services, like Cloudflare, provide a service to connect your computer in a LAN to a WAN. Alternatively, you can try other internal network tunneling services.
## Contributing
Contributions are welcome! If you find any issues or would like to add new features, please submit a pull request.