Skip to content

Developing WordPress site/plugin/theme projects with docker instead of using VVV.

Notifications You must be signed in to change notification settings

awsmug/wp-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Devops (for Mac OS & Linux)

Version 0.4.0

This project want to leave the VVV way for developing WordPress projects and to use a more lightweight and easy way to develop by using docker. The WP Devops contains an easy environment which is based on docker. It supports site-, plugin- and theme-development.

Instead of using the standard docker wordpress container, WP Devops is using a docker-compose container infrastructure where everything can be setup in detail.

In contrast to the one container structure of the WordPress docker container, the WP Devops is based on a docker-compose environment which is a lot more configurable. It contains a docker-compose file for the three types of development for sites, themes and plugins.

The environment contains:

  • Nginx
  • PHP (with Xdebug)
  • Mariadb
  • WordPress
  • WP-CLI
  • phpMyAdmin
  • MailHog

Requirements

WP Devos are made for Mac and Linux, also Composer and Docker is required. Please install before running WP Devops.

Installation

Add WP Devops functionality by using composer.

composer require awsmug/wp-devops:dev-master

Install the environment by setting up config files. Just follow the instructions. If you have setup a theme or a plugin installation you can put your code to the ./src directory and it will be displayed in the wp-admin theme or plugin section or use the initial plugin or theme files.

./vendor/bin/devops.sh init all

Running WP Devops

Start the local server (After the first start, just wait a while until you see a ready installed WordPress):

./devops.sh up

Stop the local server:

./devops.sh down

Updating devops scripts:

./devops.sh update

The site can be reached at the host you have entered in the installation at the browser. The admin can be reached at http://YOUR-HOST/wp-admin/.

Use the user 'admin' and password 'password' to login.

Environment

WP-CLI

Use the WP CLI with the wp.sh script. Example to list all plugins (see the documentation of WP CLI at https://wp-cli.org):

./wp.sh plugin list

Example to replace domain name of WordPress installation:

./wp.sh search-replace http://localhost http://mywordpres.test

phpMyAdmin

You can reach the phpMyAdmin interface at the URL http://YOUR-HOST:8080.

MailHog

You can reach the MailHog interface at the URL http://YOUR-HOST:8125.

XDebug

To debug your script we implemented Xdebug to the PHP configuration. To get it running for your project, just add your local IP to the php.ini file. This can be done in the 'conf/php/php.ini' file by replacing the 192.168.0.1 string with your local IP. The default remote debugging port is 9000.

System

OS

The scripts are tested on Mac OS and Linux. If you have informations or issues on other systems, please report on Github.

Further Configuration

For further settings we have added further configuration files for your individual server configuration. This is a list of files we offer to setup by yourself:

  • conf/nginx/default.conf
  • conf/nginx/nginx.conf
  • conf/php/php.ini
  • conf/php/www.conf

Please be careful on editing this files, this can cause issues to your setup.

Roadmap

We want to add further functionalities to the project which helps your on developing. Further options we want to add:

  • Codeception for unit-testing and user testing.
  • Xdebug autoconfig or input of IP address.
  • Deployment scripts.
  • Script which sends success on finished WordPress installation.

About

Developing WordPress site/plugin/theme projects with docker instead of using VVV.

Resources

Stars

Watchers

Forks

Packages

No packages published