About this Repo
James Swineson's WordPress variant. Suitable if you:
- use a low-end Docker public cloud service
- is migrating an old WordPress installation to Docker
- need to put the whole WordPress installation dir into a volume
- and still needs auto upgrading
- Apache 2
- PHP 7
- some useful Apache modules
- some useful PHP modules
/var/www/html as a volume.
WORDPRESS_ROOT: the path you want to install WordPress (if not exist) to. Defaults and relative to
WORDPRESS_DB_PASSWORD: MySQL things.
WORDPRESS_FIX_PERMISSION: set to chmod everything to a correct permission. Needed if you are migrating or some directory is not able to be written by WordPress. May take >6hrs on a large site. Don't set it on every container start.
WORDPRESS_NO_INSTALLATION: explicitly skip WordPress detection and auto-installation. Useful if you want a clean LAMP environment.
WORDPRESS_UPDATE: set to upgrade WordPress and all plugins on container start.
WORDPRESS_BEHIND_REVERSE_PROXY: Set to use Apache2's mod_remoteip to parse correct ip if behind a reverse proxy. Also set
WORDPRESS_REVERSE_PROXY_HEADERto your reverse proxy's IP header (defaults to
WORDPRESS_REVERSE_PROXY_ADDRto your reverse proxy's IP address (or CIDR or domain).
Behind HTTPS proxy
You may run into problems like WordPress loading all assets over HTTP or redirect loop in
/wp-login.php. To solve this, add the following code to the top of
/wp-config.php right below
// enable HTTPS detection behind proxy define('FORCE_SSL_ADMIN', true); // in some setups HTTP_X_FORWARDED_PROTO might contain // a comma-separated list e.g. http,https // so check for https existence if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
See Administration Over SSL for more information on this.
See a change merged here that doesn't show up on the Docker Hub yet? Check the "library/wordpress" manifest file in the docker-library/official-images repo, especially PRs with the "library/wordpress" label on that repo. For more information about the official images process, see the docker-library/official-images readme.
<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->