Docker image for WordPress/Apache/PHP7, optimized for low-end Docker service.
583
James Swineson's WordPress variant. Suitable if you:
Runtime:
Preinstalled:
Please mount /var/www/html as a volume.
WORDPRESS_ROOT: the path you want to install WordPress (if not exist) to. Defaults and relative to /var/www/html.WORDPRESS_DB_HOST, WORDPRESS_DB_USER, 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_HEADER to your reverse proxy's IP header (defaults to X-Forwarded-Proto) and WORDPRESS_REVERSE_PROXY_ADDR to your reverse proxy's IP address (or CIDR or domain).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 <?php tag:
// 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.
If you cannot visit any static links (they should be 404), please add a .htaccess file to the site root using content from htaccess.
If you use Wordfence WAF or any other security plugin, you may need to redo setup of them.
Everything else should work.
==============
This is the Git repo of the Docker official image for wordpress. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues.
The full readme is generated over in docker-library/docs, specifically in docker-library/docs/wordpress.
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.
Content type
Image
Digest
Size
241.7 MB
Last updated
over 5 years ago
docker pull jamesits/wordpress