This repository provides the necessary files to set up WordPress using Docker. It allows you to quickly deploy a WordPress instance with a MySQL database and phpMyAdmin for easy database management.
Before you get started, make sure you have the following tools installed on your system:
To set up WordPress on Docker, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/vladutilie/docker-wordpress.git wp-with-docker
- Navigate to the cloned repository:
cd wp-with-docker
- Create a copy of the .env.example file and name it .env:
cp .env.example .env
- Open the
.envfile in a text editor and configure the following environment variables:
MYSQL_DATABASE: The name of the MySQL database for WordPress.MYSQL_ROOT_PASSWORD: The root password for the MySQL database.MYSQL_USER: The MySQL user for WordPress.MYSQL_PASSWORD: The password for the MySQL user.NAME: A name for your WordPress Docker containers (e.g., my-wordpress-website).
- In the
docker-compose.ymlfile, you can customize the following options:
container_name: The container name if needed.- Ports, volumes, and environment variables as per your requirements.
- Start the containers:
docker-compose up -d
-
Access your WordPress site in a web browser by navigating to
http://localhost:8000(or replace localhost with your server's IP address). -
You can also access phpMyAdmin at
http://localhost:8080to manage your database using the credentials you set in the.envfile.
You can customize PHP settings by editing the uploads.ini file in this repository. It currently sets file upload limits and memory limits to generous values. Make sure to adjust these settings according to your needs.
If you'd like to contribute to this project, please open an issue or submit a pull request with your suggested changes.
This project is free of any personal or commercial use. Use it as you want. 😌
Enjoy your WordPress development with Docker! 🚀