This project provides a Docker-based environment to simplify the process of developing themes for WordPress projects. It leverages a pre-configured docker-compose.yml
file to set up a WordPress instance, a MySQL database, and phpMyAdmin for database management, all running in isolated containers.
To get started with this development environment, follow these steps:
-
Clone the repository to your local machine.
-
Navigate to the project directory where the
docker-compose.yml
file is located. -
Add your theme files to the
wp-projects
folder. This folder is mounted into the WordPress container, allowing WordPress to recognize and use your theme. -
Copy the
.env.example
file to.env
and modify the environment variables as needed.cp .env.exemple .env
-
Start the containers by running the following command in your terminal:
docker-compose up -d
-
Access WordPress by navigating to
http://localhost:8080
in your web browser. Here, you can activate your theme and start developing. -
Access phpMyAdmin by navigating to
http://localhost:8081
. Use this interface to manage your WordPress database.
-
The MySQL database credentials and other environment variables are defined in the
.env
file. You can modify these values according to your needs. -
The
wp-projects
folder is ignored by Git as specified in the.gitignore
file, ensuring that your theme files are not accidentally committed to version control. -
To stop the containers, run
docker-compose down
in your terminal.
This environment streamlines the process of developing WordPress themes by providing a ready-to-use WordPress setup. Just add your theme to the wp-projects
folder and start building your theme in a containerized environment.