https://github.com/cschindlbeck/dockerized-wp
Dockerized Wordpress Site to develop WP locally
https://github.com/cschindlbeck/dockerized-wp
apache2 docker docker-compose mysql website wordpress
Last synced: about 2 months ago
JSON representation
Dockerized Wordpress Site to develop WP locally
- Host: GitHub
- URL: https://github.com/cschindlbeck/dockerized-wp
- Owner: cschindlbeck
- Created: 2023-09-07T06:15:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T03:30:48.000Z (over 2 years ago)
- Last Synced: 2025-05-18T01:36:29.321Z (about 1 year ago)
- Topics: apache2, docker, docker-compose, mysql, website, wordpress
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerized Wordpress Site
Develop a WordPress site locally using a containerized environment with docker-compose.
## Backups
Don't forget to backup db_data and wordpress directories!
Make sure permissions and user/groups are correct when copying from a different project
## Install/Usage
Three services for DB, apache2 and WordPress, build them via
```bash
docker compose build
```
and run them via
```bash
docker compose up --detach
```
This will create a db-data and a wordpress directory, the user/group defaults are fine
Now you can visit the website at [localhost](http://localhost:80) or you can go to the [Dashboard](http://localhost/wp-admin) to configure it.
In order to stop all containers do
```bash
docker compose down
```
## Known bugs / TODO
- Change wp-config.php in the wordpress directory to the credentials set in the docker-compose.yaml
```
/** Database username */
define( 'DB_USER', getenv_docker('WORDPRESS_DB_USER', 'wpuser') );
/** Database password */
define( 'DB_PASSWORD', getenv_docker('WORDPRESS_DB_PASSWORD', 'wppassword') );
```