π¦ WordPress with Docker and Ngrok Run a fully functional WordPress site locally with public access using Docker and Ngrok. This project is ideal for developers, designers, and testers who want to share their WordPress site with others remotely without deploying it to a live server.
π Features π³ Docker-based setup for WordPress and MySQL
π Ngrok tunnel for public HTTPS access
π Easily customizable for local development or demos
πΎ Persistent database using Docker volumes
π Project Structure bash Copy Edit . βββ docker-compose.yml βββ .env βββ README.md βοΈ Requirements Docker & Docker Compose
Ngrok account (free or paid)
Basic knowledge of CLI
π§ Setup Instructions
-
Clone this repository bash Copy Edit git clone https://github.com/your-username/wordpress-ngrok-docker.git cd wordpress-ngrok-docker
-
Create a .env file (optional but recommended) env Copy Edit WORDPRESS_DB_NAME=wordpress WORDPRESS_DB_USER=wordpress WORDPRESS_DB_PASSWORD=wordpress WORDPRESS_DB_ROOT_PASSWORD=root
-
Start WordPress and MySQL with Docker bash Copy Edit docker-compose up -d WordPress will be available at: http://localhost:8000
-
Start Ngrok tunnel bash Copy Edit ngrok http 8000 Copy the public URL displayed by Ngrok (e.g. https://59fb-102-91-72-40.ngrok-free.app).
π Bypass Ngrok Browser Warning (Optional) To skip the Ngrok warning page, use:
bash Copy Edit curl -H "ngrok-skip-browser-warning: any-value" https://your-ngrok-url.ngrok-free.app Note: This only applies to API tools like curl or programmatic requests. Visitors using a browser will still see the warning unless you're on a paid Ngrok plan.
π§Ό To Stop Containers bash Copy Edit docker-compose down
π License This project is open-source under the MIT License.
π Credits Docker
WordPress
Ngrok