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 https://github.com/gott50/wordpress-docker.git - Run
docker-compose upto start the containers. - sudo chmod -R 777 ./wordpress
- Browse to http://[docker ip]:8000/ and you are ready to go! (find the
ip using
boot2docker ip). phpMyAdmin is accessible at http://[docker ip]:8100/
- use a Plugin like UpdraftPlus
- login to adminer with your WORDPRESS_DB_USER and WORDPRESS_DB_PASSWORD
- update wp_options:
- siteurl: http://[docker ip]:8000/
- home: http://[docker ip]:8000/
- wp_users
- user_login: wordpress
- user_pass: $P$B3JPafrPC9oiNOkN9jvxhUZK/Rfu6m.
docker system prune
A predefined workspace is provided to easily get going.
- Install tmuxp (
sudo pip install tmuxpon 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 Repository by joch