Need help with docker-wordpress?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

TrafeX
162 Stars 93 Forks MIT License 108 Commits 3 Opened issues

Description

WordPress container with Nginx 1.20 & PHP-FPM 8.0 based on Alpine Linux

Services available

!
?

Need anything else?

Contributors list

WordPress Docker Container

Lightweight WordPress container with Nginx 1.20 & PHP-FPM 8.0 based on Alpine Linux.

WordPress version currently installed: 5.8.1

  • Used in production for my own sites, making it stable, tested and up-to-date
  • Optimized for 100 concurrent users
  • Optimized to only use resources when there's traffic (by using PHP-FPM's ondemand PM)
  • Works with Amazon Cloudfront or CloudFlare as SSL terminator and CDN
  • Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
  • Built on the lightweight Alpine Linux distribution
  • Small Docker image size (+/-90MB)
  • Uses PHP 8.0 for better performance, lower cpu usage & memory footprint
  • Can safely be updated without losing data
  • Fully configurable because wp-config.php uses the environment variables you can pass as an argument to the container

Docker Pulls nginx 1.20 php 8.0 License MIT

Usage

See docker-compose.yml how to use it in your own environment.

docker-compose up

Or

docker run -d -p 80:80 -v /local/folder:/var/www/wp-content \
-e "DB_HOST=db" \
-e "DB_NAME=wordpress" \
-e "DB_USER=wp" \
-e "DB_PASSWORD=secret" \
-e "FS_METHOD=direct" \
trafex/wordpress

WP-CLI

This image includes wp-cli which can be used like this:

docker exec  /usr/local/bin/wp --path=/usr/src/wordpress 

Inspired by

  • https://hub.docker.com/_/wordpress/
  • https://codeable.io/wordpress-developers-intro-to-docker-part-two/
  • https://github.com/TrafeX/docker-php-nginx/
  • https://github.com/etopian/alpine-php-wordpress

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.