https://github.com/joshbuchea/starter-docker-wordpress
Docker WordPress Starter
https://github.com/joshbuchea/starter-docker-wordpress
docker starter wordpress
Last synced: about 1 year ago
JSON representation
Docker WordPress Starter
- Host: GitHub
- URL: https://github.com/joshbuchea/starter-docker-wordpress
- Owner: joshbuchea
- Created: 2017-01-16T22:51:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-19T23:06:11.000Z (about 9 years ago)
- Last Synced: 2025-03-25T12:22:01.285Z (over 1 year ago)
- Topics: docker, starter, wordpress
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Starter Docker WordPress
## Getting Started
- Build & Start Container(s), run in background: `docker-compose up -d`
- Start Container(s): `docker-compose start`
- Stop Containers: `docker-compose stop`
- Stop & Remove Containers: `docker-compose down`
## Containers
- MySQL: Port `3306`
- WordPress: Port `8000`
- phpMyAdmin: Port `8080`
- Search & Replace DB: Port `8081`
## Backup Container
- Docker Hub: https://hub.docker.com/r/aveltens/wordpress-backup/
- GitHub Repo: https://github.com/angelo-v/wordpress-backup
Commands:
- Backup WordPress (HTML & DB): `docker exec [backup_container_id] backup`
- Restore WordPress from backup: `docker exec [backup_container_id] restore [yyyyMMdd]`
Features:
- Automatic Backups
- Automatic Cleanup
- Manual backup w/ one command
- Manual restore w/ one command
The backup container makes a few assumptions:
- mysql container has a hostname of `mysql`
- mysql service has optional user/pwd defined
## From docker-compose.yml
```
###
# What's included:
# - WordPress container (defaults to port 8000)
# - database container (connected automagically to WordPress)
# - phpmyadmin container (defaults to port 8080)
# - searchreplacedb container (defaults to port 8081, connects automagically to mysql)
#
#
# Instructions:
#
# Make your directory look like this:
#
# - ./docker-compose.yml (this file)
# - ./www (should contain www files for developing)
# - ./initdb (All sql files in here will be run when docker-compose is first ran)
# - ./initdb/dump.sql (Example of putting your mysql dump in here)
#
# Note on importing SQL files:
# By default the WordPress and SearchReplaceDB contianers use the database called `wordpress`.
# It is reccomened that your sql init file starts with 'USE `wordpress`;' to make sure
# the correct database is selected.
#
# To get started, run:
# docker-compose up -d
#
#
# Troubleshooting:
#
# WordPress and/or phpmyadmin indicate there's no mysql connection
# - If you have sql files in initdb, it may take a while to import, delaying mysql to start.
# You can check the status of mysql with docker logs
#
# SearchReplaceDB is giving me errors on my wordpress tables
# - It's possible your import sql files
#
# How do I re-import?
# - To reimport, you just need to stop the docker containers (docker-compose down),
# delete the .data directory created by mysql, and then run docker-compose up -d.
##
```