Provide a name, and it sets up a website accessible at 'name.wp.local'.
Follow these steps to set up and run the project on your local machine:
Before proceeding with the setup, ensure that you have the following installed:
- Docker
-
Clone the Repository
git clone https://github.com/anuppoudel54/wp1c.git cd w1pc cp .env.example .env docker compose up -d
-
Create container
curl -X POST -H "Content-Type: application/json" -d '{"hostname":"name"}' localhost:3000/create-container
Replace "name" with your desired container name
-
Access wordpress site
Once the container is created, open your browser and navigate to http://name.wp.local. You should see the WordPress site. Replace name with your container name
- Ensure to edit your
/etc/hosts
file to mapname.wp.local
tolocalhost
. - A wildcard
*.wp.local
is not supported in the/etc/hosts
file.