参考链接:https://www.cnblogs.com/nicktcl/p/15390974.html
本站新采用docker构建,升级时报以上错误。
本站的docker-compose配置:
sx-blog:
container_name: sx-blog
image: wordpress:php7.4-apache
restart: always
ports:
- "9081:80"
deploy:
resources:
limits:
cpus: '1'
memory: 256M
reservations:
memory: 100M
privileged: true
volumes:
- ./volumes/sx-blog/www:/var/www/html:rw
logging:
options:
max-size: "10240k"
max-file: "3"
networks:
switch:
ipv4_address: 172.12.0.5
解决方法:
第一、修改wp-config.php文件
define("FS_METHOD", "direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);