https://github.com/justinhough/docker-wordpress
Docker Wordpress is a starter project to get started quickly with a fresh install of Wordpress, MySQL and WP CLI.
https://github.com/justinhough/docker-wordpress
docker docker-compose docker-wordpress mysql wordpress
Last synced: 10 months ago
JSON representation
Docker Wordpress is a starter project to get started quickly with a fresh install of Wordpress, MySQL and WP CLI.
- Host: GitHub
- URL: https://github.com/justinhough/docker-wordpress
- Owner: justinhough
- License: gpl-3.0
- Created: 2017-01-26T10:25:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T19:33:59.000Z (over 4 years ago)
- Last Synced: 2025-02-10T13:13:44.362Z (12 months ago)
- Topics: docker, docker-compose, docker-wordpress, mysql, wordpress
- Homepage: https://github.com/justinhough/docker-wordpress
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Wordpress with code-server
Docker Wordpress is a starter project to get started quickly with a fresh install of Wordpress, MySQL and WP CLI. It can be forked and customized for personal builds or for client sites.
## Initial Setup
Ensure that you have Homebrew and Homebrew Cask installed before proceeding.
```sh
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
### Install Homebrew Cask, VirtualBox, Docker, and WP CLI
```sh
brew install caskroom/cask/brew-cask
brew cask install virtualbox
brew install docker docker-machine
brew install wp-cli
```
## Start Wordpress
1. Duplicate `.sample-env` to `.env` and update for your application
2. Start Wordpress, MySQL and code-server with `docker-compose up -d`. (To stop the container use `docker-compose stop`.)
3. Open a browser `http://localhost:` and finish setting up Wordpress.
**Note:** MySQL databases and schema for Wordpress will be automagically synced into the folder `db/mysql`
### Accessing WP through WP CLI
You can run WP CLI commands through the Docker container using Docker Compose and prefixing all commands with this: `docker-compose run --rm wpcli`. Using `wpcli` at the end is merely the name of the Docker image that is installed in `docker-compose.yml`. You can change this to be anything to make it easier to remember.
**Note:** Full list of commands is listed on the [WP CLI Commands](https://wp-cli.org/commands/) page.
#### Example Commands
- `docker-compose run --service-ports --rm wpcli`
- `docker-compose run --service-ports --rm wpcli post list1`