Public | Automated Build

Last pushed: a year ago
Short Description
Full Description

Getting started

This project has 2 parts: the Docker environment and a set of tools for theme development. To quickly get started, you can simply run the following:

1. git clone
2. cd wd-wordpress
3. docker-compose up
4. You can view  the website in http://localhost:8080/
5. http://localhost:8080/wp-admin/     use root/root login

MySQL Credentials
  • username: root
  • password: root (can be changed with the MYSQL_ROOT_PASSWORD and DB_PASS environment variables)
  • database: wordpress (can be changed with the DB_NAME environment variable)
  • admin email: admin@${DB_NAME}.com
WordPress Container Environment variables
  • DB_PASS (required): Must match MYSQL_ROOT_PASSWORD of the mysql container
  • DB_NAME (optional): Defaults to wordpress
  • ADMIN_EMAIL (optional): Defaults to admin@${DB_NAME}.com
  • WP_DEBUG (optional): Defaults to false
  • THEMES (optional): Comma-separated list of themes you want to install.
  • PLUGINS (optional): Comma-separated list of plugins you want to install.
  • SEARCH_REPLACE (optional): Comma-separated string in the form of current-url,replacement-url.
    • When defined, current-url will be replaced with replacement-url on build (useful for development environments utilizing a database copied from a live site).
    • IMPORTANT NOTE: If you are running Docker on Mac or PC (using Docker Machine), your replacement url MUST be the output of the following command: echo $(docker-machine ip <your-machine-name>):8080
DB Container Environment variables
  • MYSQL_ROOT_PASSWORD (required): Must match DB_PASS of the wordpress container

Working with databases

If you have an exported .sql file from an existing website, drop the file into the data/ folder. The first time you run the container, it will detect the SQL dump and use it as a database. If it doesn't find one, it will create a fresh database.

If the SQL dump changes for some reason, you can reload the database by running:

docker-compose run wordpress wp db import "$(find /data/*.sql | head -n 1)" --allow-root

If you want to create a dump of your development database, you can run:

docker-compose run wordpress wp db export /data --allow-root

Finally, sometimes your development environment runs on a different domain than your live one. The live will be and the development localhost:8080. This project does a search and replace for you. You can set the SEARCH_REPLACE:,localhost:8080 environment variable in the docker-compose.yml.

Use wp-cli

You can access wp-cli by running npm run wp .... Here are some examples:

npm run wp plugin install <some-plugin>
npm run wp db import /data/database.sql

Use Compass

Install sass, compass for develop wd custom child theme

gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL | bash -s stable
  • install ruby
rvm install 2.2.3
rvm use 2.2.3  
  • install compass
gem install compass
rvm use 2.2.3  
  • compass watch file
cd wd-wordpress/app/themes/thevoux-wp-child
compass watch

Sync css and sass file

Docker Pull Command
Source Repository