Difference between revisions of "WordPress"
Revision as of 16:50, 9 November 2019
Getting a new installation of WordPress with the official docker image is trivial.
wordpress: image: wordpress:5-php7.3-apache labels: - "traefik.enable=true" - "traefik.port=80" - "traefik.docker.network=traefik" - "traefik.web.frontend.rule=Host:wordpress.local" depends_on: - db networks: - traefik - db-net expose: - "8080" restart: always environment: - WORDPRESS_DB_HOST=db - WORDPRESS_DB_USER=wordpress - WORDPRESS_DB_PASSWORD=wordpress - WORDPRESS_DB_DB_NAME=wordpress volumes: - /var/volumes/local-web/data/wordpress:/var/www/html
The WordPress image will only install and re-configure the
wp-config.php file using environment variables. It will not update WordPress for you, though this isn't an issue since WordPress can self-update.
To allow plugins and theme installs without FTP, change
direct and ensure that the
wp-content directory is owned by Template:Codoe or uid
## Add to wp-content.php ## define('FS_METHOD', 'direct'); /var/www/html# chown -R www-data wp-content