WordPress Docker makes developing for WordPress easy and predictable. It sets up everything for you, so that you can dive straight into developing your plugins and themes without any hassle.
There in a more in-depth blog post is available called Develop WordPress plugins and themes using Docker.
- Clone this repostory:
git clone --recursive https://github.com/joch/wordpress-docker.git
- Copy the provided config file to the WordPress directory:
cp wp-config.php wordpress/
- Run
docker-compose up
to start the containers. - Browse to http://[docker ip]:8000/ and you are ready to go! (find the
ip using
boot2docker ip
)
A predefined workspace is provided to easily get going.
- Install tmuxp (
sudo pip install tmuxp
on a Mac) - Run
tmuxp load tmuxp.yml
(provided that you have tmux installed) - A tmux session will be started with a vim window located in the plugins directory. The containers are started automatically in the second window.
If you are running boot2docker
, you can easily find your Docker IP by
running boot2docker ip
.
The easiest way to install boot2docker and fig is to use Homebrew and follow these steps:
- Install VirtualBox.
- Install the software:
brew install boot2docker fig
. - Create a virtual machine:
boot2docker init
. - Finally start the virtual machine:
boot2docker up
.
The setup is based on the excellent article Getting started with Fig and WordPress.