Skip to content

A starter config for setting WordPress, WP-CLI, phpMyAdmin and database within Docker.

Notifications You must be signed in to change notification settings

vladutilie/docker-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress on Docker

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.

Prerequisites

Before you get started, make sure you have the following tools installed on your system:

Getting Started

To set up WordPress on Docker, follow these steps:

  1. Clone this repository to your local machine:
git clone https://github.com/vladutilie/docker-wordpress.git wp-with-docker
  1. Navigate to the cloned repository:
cd wp-with-docker
  1. Create a copy of the .env.example file and name it .env:
cp .env.example .env
  1. Open the .env file 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).
  1. In the docker-compose.yml file, you can customize the following options:
  • container_name: The container name if needed.
  • Ports, volumes, and environment variables as per your requirements.
  1. Start the containers:
docker-compose up -d
  1. Access your WordPress site in a web browser by navigating to http://localhost:8000 (or replace localhost with your server's IP address).

  2. You can also access phpMyAdmin at http://localhost:8080 to manage your database using the credentials you set in the .env file.

Customizing PHP Settings

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.

Contributing

If you'd like to contribute to this project, please open an issue or submit a pull request with your suggested changes.

License

This project is free of any personal or commercial use. Use it as you want. 😌

Enjoy your WordPress development with Docker! 🚀

About

A starter config for setting WordPress, WP-CLI, phpMyAdmin and database within Docker.

Resources

Stars

Watchers

Forks