This is a simple local development environment for WordPress using Docker Compose. It consists of two services, a MySQL database and a WordPress web server.
- Docker Engine
- Docker Compose
- Clone this repository to your local machine
- Navigate to the cloned directory
- Start the environment with
docker-compose up -d
- Access the WordPress site at
http://localhost:8000
To develop plugins or themes for WordPress, you need to create a folder for your theme or plugin in the root directory of your docker-compose file. For themes, the folder should be /themes/[YOUR_THEME_NAME]
and for plugins, it should be /plugins/[YOUR_PLUGIN_NAME]
.
The environment can be configured by modifying the docker-compose.yml
file. The following configuration options are available:
The db
service is responsible for the MySQL database. It can be configured with the following environment variables:
MYSQL_ROOT_PASSWORD
: The root password for the MySQL serverMYSQL_DATABASE
: The name of the WordPress databaseMYSQL_USER
: The username for the WordPress databaseMYSQL_PASSWORD
: The password for the WordPress database
The wordpress
service is responsible for the WordPress web server. It can be configured with the following environment variables:
WORDPRESS_DB_HOST
: The hostname of the MySQL serverWORDPRESS_DB_USER
: The username for the WordPress databaseWORDPRESS_DB_PASSWORD
: The password for the WordPress databaseWORDPRESS_DB_NAME
: The name of the WordPress database
If you find a bug or have an idea for a new feature, please open an issue or pull request on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.