How to Set Up WordPress with Docker Compose (YAML)
In this tutorial, I’ll show you how to quickly deploy a WordPress site using Docker Compose with a YAML configuration.
1. Prepare Your docker-compose.yml File
Create a file named
docker-compose.yml and paste in the following content:2. Start Your Containers
Open your terminal, navigate to the folder containing your
docker-compose.yml, and run:This command will download the necessary images and start your WordPress and MySQL containers.
3. Complete the WordPress Installation
- Open your browser and go to http://194.164.54.162:7300/wp-admin/install.php
- Select English as your language.
- Set your desired username and password for the WordPress admin account.
- Complete the installation steps as prompted.
4. Increase Upload and Execution Limits
If you want to increase the PHP upload and execution limits (for example, to allow larger file uploads), follow these steps:
- Log in to your WordPress container:
- Once inside the container, run the following commands to update your
.htaccessfile and install some useful tools:
- Exit the container and restart it to apply the changes:
Summary
You have now deployed WordPress with Docker Compose, set up your admin account, and increased your upload and execution limits for better performance.
{fullWidth}
