Skip to content

gregoryfoster/docker-wordpress-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Composition for WordPress Plugin Development

This repository provides a baseline WordPress Plugin development environment. This Docker composition consists of two container images:

  • dwp-mysql: MySQL (5.5)
  • dwp-wordpress: WordPress (latest)

Usage

  1. Ensure you have Docker installed.
  2. Run your Docker machine or daemon. On OS X, make note of the local IP address assigned to the machine, as that's where the WordPress container's web port will be made available. You can always get that value using docker-machine env.
  3. Clone this repository to your local machine.
  4. cd docker-wordpress-plugin
  5. docker-compose up
  6. Clone your plugin code into wordpress/plugins, which is a docker volume mounted at the WordPress container's wp-content/plugins directory.
  7. Open your Docker machine's IP address in a web browser. You'll be greeted by the WordPress installation screen. Setup and sign in.
  8. Activate and configure your plugin.
  9. Work on your plugin code. With this configuration, changes are immediately available to your local WordPress instance without the necessity to commit code.
  10. docker-compose stop

Notes

  • The MySQL container image is not currently configured to persist state between builds. Therefore, if you rebuild the container image, it will not retain any changes made to WordPress. However, if you stop the services and restart them, the data will still be available.
  • In the time since this Docker composition was put together, Docker has released a native OS X client in private beta. Sign up for early access as the native client will almost certainly make this whole approach much simpler.

About

Docker Composition for WordPress Plugin Development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages