This repository contains a demo setup for WordPress, showcasing a simple environment to get WordPress up and running quickly. It is designed for educational purposes and for testing WordPress features in a local or development environment.
- Pre-configured WordPress Setup: A fully functional WordPress demo with minimal configuration.
- Docker Support: Uses Docker and Docker Compose for easy setup and teardown.
- Customizable: Environment variables allow easy customization of the WordPress setup.
- Lightweight and Portable: Quickly spin up or destroy your WordPress instance without affecting your local machine configuration.
- Docker installed on your machine.
- Docker Compose installed.
-
Clone this repository to your local machine:
git clone https://github.com/OddRefrigerator/wordpress-demo.git cd wordpress-demo
-
Start the WordPress demo environment using Docker Compose:
docker-compose up -d
This will pull the required images and start the containers for WordPress and MySQL.
-
Once the containers are up and running, open your browser and go to:
http://localhost:8000
Follow the on-screen instructions to complete the WordPress installation (choose a site name, admin credentials, etc.).
You can customize the environment using the .env
file. The following parameters can be adjusted:
- WORDPRESS_DB_NAME: Set the name of the WordPress database (default:
wordpress
). - WORDPRESS_DB_USER: Set the username for the MySQL database (default:
user
). - WORDPRESS_DB_PASSWORD: Set the password for the MySQL database (default:
password
). - WORDPRESS_DB_HOST: Hostname of the MySQL server (default:
db
).
You can edit these values in the .env
file before running docker-compose up
.
To stop the WordPress environment, run:
docker-compose down
This will stop and remove the containers. The data (like the WordPress content and database) will persist unless you remove the volumes.
To remove all data and start fresh:
docker-compose down -v
-
If you encounter issues with the WordPress site not loading, ensure that Docker is running and the containers are healthy. You can check the container status using:
docker ps
-
Check logs for any errors:
docker-compose logs
Contributions are welcome! If you find a bug or have an idea for a new feature, feel free to submit an issue or a pull request.
- Fork the repository.
- Create a new branch for your feature or fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of your feature or fix"
- Push your branch:
git push origin feature-name
- Open a pull request with a detailed explanation of your changes.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or issues, feel free to open an issue on GitHub or contact the repository owner.
Enjoy your WordPress demo setup!