This project provides a Docker-based development environment for WordPress. It allows for quick and easy setup of a WordPress instance with all necessary services. On Windows use it with WSL2.
- WordPress CMS (official PHP-FPM image) behind Nginx, with Caddy terminating HTTPS
- MySQL Database
- phpMyAdmin for database management
- Mailpit for email testing
- WP-CLI for command-line management
- Optional plugin/theme management via Make targets (clone from Git, reset folders)
- Optional WordPress dev blueprint cloned beside
wordpress/on the firstmake wp-fresh-start
- Docker
- Docker Compose
- Make (optional, but recommended). If not installed on Debian/Ubuntu use
sudo apt-get update && sudo apt-get install make.
git clone https://github.com/jswebschmiede/docker-wordpress-starter.git <your-project-name>
cd <your-project-name>
cp .env.example .env
# Edit .env: set passwords, WP_ADMIN_*, WP_URL (must match https://127.0.0.1:${WEB_PORT})
make wp-fresh-startmake wp-fresh-start installs an optional dev blueprint when WP_DEV_BLUEPRINT_URL is set and the target folder is missing, then starts the stack, installs WordPress with the admin user from .env, resets plugins/themes, and reinstalls from PLUGINS_GIT_URLS / THEMES_GIT_URLS. Optional .env options: WP_LANG (e.g. de_DE for German), PLUGINS_SLUGS (space-separated plugin slugs from wordpress.org, installed and activated), THEMES_KEEP (first theme is auto-activated). Open https://127.0.0.1:6969/wp-admin and log in with WP_ADMIN_USER / WP_ADMIN_PASSWORD.
Port 6969 serves HTTPS. A request to http://127.0.0.1:6969 is redirected to https://127.0.0.1:6969. https://localhost:6969 works as well.
make up– Start containers only. Fast, no WP setup. Also imports the local Caddy CA into the Windows user trust store whenpowershell.exeis available (WSL2). Containers do not start with the Docker daemon; start them withmake up.make install-wp– Install WordPress manually (e.g. aftermake reset). If WordPress is already installed, updateshomeandsiteurltoWP_URL.make trust-cert– Export the Caddy root CA and trust it. Runs automatically at the end ofmake up.make wp-fresh-start– Full setup: optional dev-blueprint install + up + install-wp + content-reset + content-install. Use for first run or when you need a clean content state.make dev-blueprint-install– ClonesWP_DEV_BLUEPRINT_URLintoWP_DEV_BLUEPRINT_DIRwhen that folder is missing. Runs at the start ofmake wp-fresh-start.
make wp -- user list
make wp -- plugin list
make wp -- theme listmake up: Starts the containers and trusts the local Caddy CAmake trust-cert: Exportsdocker/caddy/pki/root.crtand installs it into the Windows current-user root store whenpowershell.exeis availablemake start: Displays information about the running environmentmake stop: Stops the containersmake down: Stops and removes the containersmake reset: Removes all containers and local datamake log: Shows the logs of the containersmake config: Shows the resolved docker compose configuration
make plugins-reset: Clearswordpress/wp-content/plugins(keepsindex.phpif present)make themes-reset: Clearswordpress/wp-content/themes(keepsindex.phpand the slugs inTHEMES_KEEP)make activate-theme: Activates the first theme fromTHEMES_KEEP(runs automatically at end ofwp-fresh-start)make install-plugins-slugs: Installs and activates plugins fromPLUGINS_SLUGSvia wordpress.org (runs after content-install inwp-fresh-start)make plugins-install: Clones or updates repositories fromPLUGINS_GIT_URLSintowp-content/pluginsmake themes-install: Clones or updates repositories fromTHEMES_GIT_URLSintowp-content/themesmake content-install: Runsplugins-installandthemes-installmake content-reset: Runsplugins-resetandthemes-resetmake dev-blueprint-install: ClonesWP_DEV_BLUEPRINT_URLintoWP_DEV_BLUEPRINT_DIRwhen that folder is missing. Also runs at the start ofwp-fresh-start.
docker-compose.yml– Caddy (HTTPS), Nginx, WordPress (PHP-FPM), MySQL, phpMyAdmin, Mailpit, WP-CLI service.env.example– Template withWP_ADMIN_*,WP_LANG,PLUGINS_SLUGS,THEMES_KEEPformake install-wpmakefile–install-wp(runs wp core install),wp(pass-through for any WP-CLI command)wordpress/– WordPress files (created on first start, gitignored)dev-blueprint/– Optional cloned dev blueprint (not gitignored; commit it in a project repo)scripts/dev-blueprint-install.sh– Clone, strip nested.git, seedboilerplate-theme/.envdb/– Database files (created on first start)docker/php/conf.d/uploads.ini– PHP upload limits configurationdocker/nginx/default.conf– Nginx site config (permalinks, PHP-FPM, upload limit, HTTPS fromX-Forwarded-Proto)..htaccessis ignored here; on an Apache host WordPress still uses.htaccessfor permalinks.docker/caddy/Caddyfile– Local HTTPS reverse proxy in front of Nginx- No Dockerfile – uses official
wordpress,wordpress:cli,nginx, andcaddyimages
- WordPress Frontend: https://127.0.0.1:6969
- WordPress Backend: https://127.0.0.1:6969/wp-admin
- phpMyAdmin: http://127.0.0.1:8080
- Mailpit: http://127.0.0.1:8025
You can customize the configuration in the .env file to change ports, versions, and other settings. Ensure WP_URL matches your actual URL (e.g. https://127.0.0.1:6969 when using default WEB_PORT). After changing WP_URL on an existing install, run make install-wp so home and siteurl follow it.
WP_LANG: Locale code for WordPress core (e.g.de_DEfor German,en_USdefault). Installed and activated duringinstall-wp.PLUGINS_SLUGS: Space-separated plugin slugs from wordpress.org (e.g.akismet contact-form-7). Plugins are installed and activated aftercontent-installinwp-fresh-start.THEMES_KEEP: Space-separated theme slugs kept duringthemes-reset. The first slug is activated automatically aftercontent-installinwp-fresh-start.WP_DEV_BLUEPRINT_URL: Git URL of a dev blueprint. Empty skips the clone. Example:https://github.com/jswebschmiede/Wordpress-Dev-Blueprint.git.WP_DEV_BLUEPRINT_DIR: Relative folder next towordpress/(defaultdev-blueprint).
Set WP_DEV_BLUEPRINT_URL when this repository should also contain your theme and plugin source. make wp-fresh-start (and make dev-blueprint-install) clones that URL into WP_DEV_BLUEPRINT_DIR only when the folder is missing or empty, deletes the nested .git, and writes WP_CONTENT_PATH in boilerplate-theme/.env to this project's wordpress/wp-content when that key is missing or empty.
make reset removes wordpress/ and db/ only. The blueprint folder stays.
After the clone, build and sync from the blueprint package (pnpm and Composer are not run by Make):
cd dev-blueprint/boilerplate-theme
pnpm install
pnpm run sync:themeFollow the blueprint README for rename, Composer, and plugin sync. PLUGINS_GIT_URLS and THEMES_GIT_URLS stay available for separate Git checkouts into wp-content. Use those only when you want that extra copy; the blueprint sync is the path for theme and plugin source that lives in this repo.
Copy dev-blueprint/cursor/ to .cursor/ yourself if you want those Cursor rules. Make does not merge that folder, so an existing .cursor/ is left as it is.
Commit dev-blueprint/ in the project repository, then clear WP_DEV_BLUEPRINT_URL unless you intend another fresh clone (delete the folder first).
Caddy issues certificates for 127.0.0.1 and localhost from its own CA. make up copies the root to docker/caddy/pki/root.crt and, on WSL2, adds it to the Windows current-user root store. Chrome and Edge trust that store. Restart the browser once if a certificate warning remains.
Firefox uses its own store. Import docker/caddy/pki/root.crt under Settings → Privacy & Security → Certificates → View Certificates → Authorities.
Without powershell.exe, make trust-cert only exports the file and prints how to install it into the Linux system store:
sudo cp docker/caddy/pki/root.crt /usr/local/share/ca-certificates/caddy-local-root.crt
sudo update-ca-certificatesIf you encounter problems, try the following steps:
- Stop the containers with
make down - Remove local data with
make reset - Restart with
make wp-fresh-startfor a clean WordPress install, ormake upif you only need the containers
If problems persist, check the logs with make log.
Contributions are welcome! Please create an issue or pull request for improvement suggestions.
This project is licensed under the MIT License. See the LICENSE file for details.