Skip to content

bfren/docker-wordpress

Repository files navigation

Docker WordPress

GitHub release (latest by date) Docker Pulls Docker Image Size GitHub Workflow Status

Docker Repository - bfren ecosystem

Comes with WordPress en_GB preinstalled - if you want a different locale, use the Dockerfiles and set the WP_LOCALE argument. Ninja Firewall is preinstalled and setup to work in Full WAF mode. WP-WebAuthn is also preinstalled to provide support for passkey authentication.

The required and recommended PHP modules are all installed.

Contents

Ports

  • 80

Volumes

Volume Purpose
/wp-content wp-content directories and wp-config.php file.

See the Nginx image for other configuration details.

Environment Variables

See the Nginx + PHP image for details of www.conf and php.ini overrides using environment variables.

Variable Values Description Default
BF_WP_CLEAN_INSTALL 0 or 1 Set to 1 to wipe WordPress files and start again (WARNING: YOU WILL LOSE EVERYTHING!). 0
BF_WP_CONFIG_ADDITIONAL string Additional configuration settings to add to the end of wp-config.php - use in conjunction with WP_CONFIG_GENERATE=harden. None
BF_WP_CONFIG_HARDEN 0 or 1 Default value 1 makes wp-config.php readonly. Value 0 makes it writeable - helpful for plugins that need to write values to it. 1
BF_WP_CONFIG_REGENERATE 0 or 1 Default value 1 generates wp-config.php each time and makes readonly. Value 0 generates if it does not exist but then leaves it alone. harden
BF_WP_DB_NAME string Database name. None - required if BF_WP_CONFIG_REGENERATE is '1'
BF_WP_DB_USER string Database username. None - required if BF_WP_CONFIG_REGENERATE is '1'
BF_WP_DB_PASS string Database password. None - required if BF_WP_CONFIG_REGENERATE is '1'
BF_WP_DB_HOST string Database host. None - required if BF_WP_CONFIG_REGENERATE is '1'
BF_WP_DB_CHARSET string Database character set (leave as default if not sure). utf8mb4
BF_WP_DB_COLLATE string Database collation (leave blank if not sure). None
BF_WP_DB_PREFIX string Database table prefix - an underscore will be added automatically. wp
BF_WP_DEBUG true or false Whether or not to enable debug mode. false
BF_WP_DISABLE_MAJOR_UPDATES 0 or 1 Set to 0 to enable WordPress core major system updates (otherwise they are handled by the image). 1
BF_WP_ENABLE_HTTPS_BEHIND_PROXY 0 or 1 Whether or not to enable HTTPS behind a proxy server. 1
BF_WP_INSTALL_NINJAFIREWALL 0 or 1 Whether or not to install the NinjaFirewall plugin. 1
BF_WP_INSTALL_WEBAUTHN 0 or 1 Whether or not to install the WebAuthn plugin. 1
BF_WP_REDIS_HOST string Set to enable redis on the specified host. None
BF_WP_REDIS_PORT integer Set to override the default redis port (6379). None
BF_WP_USE_SYSTEM_CRON 0 or 1 Set to 0 to use WordPress cron instead of system cron (reduces page performance). 1

Helper Functions

Function Purpose Usage
wp-cron Runs the WordPress cron - if WP_USE_SYSTEM_CRON is 1, will be run automatically. wp-cron

Nginx Configuration Helpers

The image contains a handful of useful Nginx configuration 'helper' files, which you can find in /overlay/etc/nginx/helpers. They all begin with the prefix 'wp':

Helper Description
-restrictions.conf Adds various security-based restrictions.
-subdirectory.conf Enables WordPress to run in a wordpress subdirectory - copy and replace with the name your own subdirectory to use.

Licence

MIT

Copyright

Copyright (c) 2020-2025 bfren (unless otherwise stated)

About

Docker WordPress image.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy