Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.34 KB

README.md

File metadata and controls

65 lines (51 loc) · 1.34 KB

Wordpress Docker Compose

A simple docker-compose setup for Wordpress development

Quick start

# Clone the repo
git clone [email protected]:woutrbe/wordpress-docker-compose.git

# Change working directory
cd wordpress-docker-compose

# Start containers
docker-compose up

# Stop containers
docker-compose stop

# Remove containers
docker-compose rm

Configuration

MYSQL root password

By default the root mysql password will be rootpassword, this can be changed in the docker-compose file

mysql:
  environment:
    MYSQL_ROOT_PASSWORD: rootpassword

wordpress:
  environment:
    WORDPRESS_DB_USER: root
    WORDPRESS_DB_PASSWORD: rootpassword

MYSQL database name

By default the database name will be mywordpresssite, this can be changed in the docker-compose file

mysql:
  environment:
    MYSQL_DATABASE: mywordpresssite

wordpress:
  environment:
    WORDPRESS_DB_NAME: mywordpresssite

Theme development

If you're only looking to develop themes, update the docker-compose file with:

wordpress:
  volumes:
    - ./src/wp-content/themes/theme_name/:/var/www/html/wp-content/themes/theme_name/

Plugin development

If you're only looking to develop plugins, update the docker-compose file with:

wordpress:
  volumes:
    - ./src/wp-content/plugins/plugin_name/:/var/www/html/wp-content/plugins/plugin_name/