visit
choco install docker-desktop
choco install docker-kitematic
docker run hello-world
Save the following file as
docker-compose.yml
.version: "3.3"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
ports:
- "3306:3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- wordpress:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
db_data: {}
wordpress: {}
Open a shell in the directory where you saved the docker-compose file and run
docker-compose up -d
. After a few minutes, you'll have WordPress running on your machine.To create a plugin, you need to add a folder in WordPress'
plugins
directory. To find the root directory, open kitematic by clicking on the docker icon in the system tray and selecting kitematic
from the menu.Now select the WordPress container on the left side of the window, and click
/var/www/html
under the list of volumes on the right side.This will open Windows Explorer with the
html
folder selected. Open it, then browse to wp-content->plugins
. Create a new folder called first-plugin then open it. Create a file called index.php
inside the new folder and paste the following code into it:<?php
/**
* Plugin Name: First Plugin
* Plugin URI: //voiceify.io
* Description: Your very first plugin!
* Version: 1.0
* Author: Ben Force
* Author URI: //twitter.com/theBenForce
* License: GPLv2 or later
**/