WordPress: Difference between revisions
From Leo's Notes
This page was last edited on 15 June 2020, at 00:00.
initial content |
m added categories |
||
| (One intermediate revision by the same user not shown) | |||
| Line 31: | Line 31: | ||
The WordPress image will only install and re-configure the {{code|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. | The WordPress image will only install and re-configure the {{code|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 {{code|FS_METHOD}} to {{code|direct}} and ensure that the {{code|wp-content}} directory is owned by {{ | To allow plugins and theme installs without FTP, change {{code|FS_METHOD}} to {{code|direct}} and ensure that the {{code|wp-content}} directory is owned by {{code|www-data}} or uid {{code|82}}. | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 39: | Line 39: | ||
/var/www/html# chown -R www-data wp-content | /var/www/html# chown -R www-data wp-content | ||
}} | }} | ||
[[Category:Containers]] | |||
{{Navbox Web}}[[Category:WebApp]] | |||
Latest revision as of 00:00, 15 June 2020
Docker Image
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 FS_METHOD to direct and ensure that the wp-content directory is owned by www-data or uid 82.
## Add to wp-content.php
## define('FS_METHOD', 'direct');
/var/www/html# chown -R www-data wp-content
| ||||||