PHPackages                             visay/dockerwordpress - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. visay/dockerwordpress

ActiveLibrary

visay/dockerwordpress
=====================

Docker Compose structure to quickly startup Wordpress projects

1.1.1(7y ago)23582MITShell

Since Apr 10Pushed 7y ago2 watchersCompare

[ Source](https://github.com/visay/DockerWordpress)[ Packagist](https://packagist.org/packages/visay/dockerwordpress)[ RSS](/packages/visay-dockerwordpress/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

DockerWordpress helps you developing Wordpress projects
=======================================================

[](#dockerwordpress-helps-you-developing-wordpress-projects)

DockerWordpress creates the necessary Docker containers (webserver, database, php, mail, redis, elasticsearch, couchdb) to run your Wordpress project. The package provides a wrapper script in `vendor/bin/dockerwordpress` which simplifies the handling of docker and does all the configuration necessary.

We created this package to make development on Wordpress projects easier and to create a simple reusable package which can easily be maintained and serves well for the standard project.

Development will continue further as the package is already reused in several projects. Contributions and feedback are very welcomed.

Install docker
--------------

[](#install-docker)

```
https://docs.docker.com/installation/ (tested with docker v17.03)

```

Install docker-compose
----------------------

[](#install-docker-compose)

We use docker-compose to do all the automatic configuration:

```
http://docs.docker.com/compose/install/ (tested with docker-compose v1.12)

```

The repository contains a Dockerfile which will automatically be built in the [docker hub](https://registry.hub.docker.com/u/visay/dockerwordpress/) after each change and used by docker-compose to build the necessary containers.

Install dockerwordpress into your distribution
----------------------------------------------

[](#install-dockerwordpress-into-your-distribution)

Add `visay/dockerwordpress` as dev dependency in your composer.

*Example*:

```
composer require --dev visay/dockerwordpress dev-master

```

*Note*:

DockerWordpress uses port 80 for web access so you need to make sure that your host machine does not have any software using that port. Usually this happens if you have apache or nginx installed in your host machine, so you can stop it with:

```
sudo service apache2 stop
sudo service nginx stop

```

Run dockerwordpress
-------------------

[](#run-dockerwordpress)

```
vendor/bin/dockerwordpress up -d

```

The command will echo the url with which you can access your project. Add the hostname then to your `/etc/hosts`and set the ip to your docker host (default for linux is 0.0.0.0). You can also use any subdomain with \*.hostname and it will point to the same server. What you need to do is to add exact subdomain name to your `/etc/hosts`. The parameter `-d` will keep it running in the background until you run:

```
vendor/bin/dockerwordpress stop

```

The default database configuration for your `wp-config.php` is:

```
