Use WordPress locally with Docker using Docker compose
- A
Dockerfilefor extending a base image and using a custom Docker image with an automated build on Docker Hub - PHP 8.1
- Custom domain and HTTPS support. So you can use for example https://myapp.local
- Custom nginx config in
./nginx - Custom PHP
php.iniconfig in./config - Volumes for
nginx,wordpressandmariadb - Composer - dependency manager for PHP
- Bedrock - modern development tools, easier configuration, and an improved secured folder structure for WordPress
- WP-CLI - WP-CLI is the command-line interface for WordPress.
- MailHog - An email testing tool for developers. Configure your outgoing SMTP server and view your outgoing email in a web UI.
- PhpMyAdmin - free and open source administration tool for MySQL and MariaDB
- PhpMyAdmin config in
./config
- PhpMyAdmin config in
- CLI script to create a SSL certificate using mkcert
See the new Wiki
- Update Composer to use PHP 8.1
- Added a GitHub Wiki for instructions
- Use PHP 8.1 Dockerfile is updated.
- Updated the Docker image to use PHP 8
- Updated to WordPress 5.8.0
- Changed root
.env-exampleto.env.exampleto match the git ignore patterns. Thanks @scottnunemacher
- Clarify steps in the readme
- Fixed a misstake so instead of
./src/.env-example, it should be./src/.env.example. - Redirect HTTP to HTTPS. Thanks @humblecoder
- Use
NGINX_ENVSUBST_TEMPLATE_SUFFIX. Use a template and better substution of ENV variables in nginx config.
- Added mariadb-client (Solves #54)
- Updated Bedrock. Update WordPress to 5.5.1 and other composer updates.
- Added Mailhog. Thanks @mortensassi
- Added nginx gzip compression
- Added Windows support for creating SSH cert, trusting it and setting up the host file entry. Thanks to @styssi
- Remove port number from
DB_HOST. Generated database connection error in macOS Catalina. Thanks to @nirvanadev - Add missing ENV variable from mariadb Thanks to @vonwa
- Added phpMyAdmin config.Thanks to @titoffanton
- Readme improvements. Explain
/etc/hostsbetter
- Use
Entrypointcommand in Docker Compose to replace the domain name in the nginx config. Removing the need to manually edit the domain name in the nginx conf. Now using the.envvalueDOMAIN - Added APP_NAME in
.env-exampleThanks to @Dave3o3
- Added
.envsupport for specifying your own app name, domain etc in Docker and cli scripts. - Added phpMyAdmin. Visit http://127.0.0.1:8080/
- Added Linux support. Thanks to @faysal-ishtiaq.