Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Development Environment

Diego Juliao edited this page Mar 10, 2018 · 5 revisions

Features

  • πŸ”₯ Wp-CLI WordPress Command Line Tool, useful to manage your WordPress site by console
  • πŸ”₯ phpMyAdmin Database Administrator, useful to manage your database in graphic mode
  • πŸ”₯ WordMove Tool that lets you automatically mirror local WordPress installations and DB data back and forth from your local development machine to the remote server
  • Nginx HTTP Server
  • MariaDB DataBase, same as MySQL but opensource
  • Change the PHP version. You can change with ease the PHP version

Steps to begin with a new WP project

  1. Pull and Build Docker Images
    • docker-compose pull
    • docker-compose build
  2. Create the user and a DB using phpMyAdmin
    • export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && docker-compose up phpmyadmin
      • Replace YOUR_SUPER_SECURE_PASSWORD with the password that you want to use for the root user in your DB
    • Create an User and a Database with the same name and all privileges
      • Access to phpMyAdmin through http://localhost:8888/
      • When creation the user make sure to allow connection from any host
  3. Download the WordPress core
    • docker-compose run --rm --user=$UID wp_server wp core download
  4. Create your wp-config file
    • docker-compose run --rm --user=$UID wp_server wp core config --prompt
      • 1/12 --dbname=<dbname>: YOUR_DB_NAME
      • 2/12 --dbuser=<dbuser>: USER_CREATED_AT_1
      • 3/12 [--dbpass=<dbpass>]: PASS_CREATED_AT_1
      • 4/12 [--dbhost=<dbhost>]: mariadb
      • 5...12 - Default values set by enter
  5. Install WordPress
    • docker-compose run --rm --user=$UID wp_server wp core install --prompt
      • 1/6 --url=<url>: localhost
      • 2...6 - Your personal configuration
  6. Up and Running
    • export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && export UID && docker-compose up
      • Visit localhost and enjoy

      export UID is needed for create every WordPress file as if were you, not root user. When downloading a theme, plugin and be able to modify it with your text editor.

Using wp-CLI

With the docker-compose running using export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && export UID && docker-compose up you can execute wp-CLI commands with:

docker-compose exec wp_server wp plugin install woocommerce --activate

WordMove

  1. Configure your move file
    • The file is on configs/wordmove/movefile.yml
  2. Install mysqldump in your server
  3. Log in into the Wordmove container
    • docker-compose run --rm wordmove /bin/bash
  4. Pull, Push what ever you want

Deployment Diagram

deployment diagram

Clone this wiki locally

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /