https://github.com/gcsecsey/local-wordpress
🔌 Pluggable Wordpress docker template for local development
https://github.com/gcsecsey/local-wordpress
docker docker-compose mysql wordpress
Last synced: 3 months ago
JSON representation
🔌 Pluggable Wordpress docker template for local development
- Host: GitHub
- URL: https://github.com/gcsecsey/local-wordpress
- Owner: gcsecsey
- Created: 2021-03-07T19:28:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-07T20:00:16.000Z (over 5 years ago)
- Last Synced: 2025-03-16T01:41:33.830Z (over 1 year ago)
- Topics: docker, docker-compose, mysql, wordpress
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wordpress setup for local development
I've been using this stack for a while for quick prototyping, debugging and error reproduction on my local machine.
# Prerequisites
- Docker Desktop for Mac and Windows
- Docker Engine and docker-compose for Linux
# Initialization
## Start fresh instances
Take a look at the compose file, and modify the default credentials and ports if needed. Then start new instances by issuing:
```
docker-compose up -d
```
By default:
- the Wordpress instance will be available on `http://localhost:8080`
- you can connect to the MySQL server on `localhost:3306`
You can stop the instances by running:
```
docker-compose down
```
## PLug existing Wordpress data
- Move the contents of the Wordpress installation into the `src` folder.
- Update `src/wp-config.php` with the MySQL credentials from `docker-compose.yml`
## Plug existing database
Move the contents of the sql dump into the `dump.sql` file. Note that it will be loaded into the database name given to `MYSQL_DATABASE` in `docker-compose.yml`.
## Clearing exisiting instances
> âš Warning
>
> Note that all data in the MySQL database will be lost
To delete all existing instances, you can run:
```
docker-compose down -v
```
# Tweaks
## Upload limit
The wordpress container's default config allows uploads upto 150MBs. These settings can be adjusted in the `uploads.ini` file.