Skip to content

A base docker-compose set up for building WordPress sites. It contains images for apache-php, mysql, mailhog and the very useful wp-cli

Notifications You must be signed in to change notification settings

Feyisayo/docker-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the base docker-compose set up I use for WordPress sites. It contains images for apache-php, mysql, mailhog and the very useful wp-cli

How To Use

  • Install docker-compose. See https://docs.docker.com/compose/

  • Download WordPress from https://wordpress.org and put the wordpress files in the src folder

  • In the wp-config.php file set up the database as follows

    define('DB_NAME', 'wordpress');

    define('DB_USER', 'root');

    define('DB_PASSWORD', 'root');

    define('DB_HOST', 'mysql-server');

  • Run docker-compose build

  • Run docker-compose up -d and voila!! you're good to go

  • In your browser go to http://localhost

  • You can also add an entry to your hosts files (that's at /etc/hosts on debian-based systems) to customize the URL for the wordpress site. The default friendly name is wordpress.local. You can change this from the apache configuration file at includes/000-default.conf

  • Access the mailhog app by going to http://localhost:8025

About

A base docker-compose set up for building WordPress sites. It contains images for apache-php, mysql, mailhog and the very useful wp-cli

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published