Wordpress wp-config.php doesn't update in Dockers?

前端 未结 3 1663
我寻月下人不归
我寻月下人不归 2021-02-15 14:50

I am using Wordpress and docker container. The problem is that I updated the wp-config.php file but everything looks the same. I have something like this:

CONTA         


        
3条回答
  •  长发绾君心
    2021-02-15 15:15

    The trick:

    wp:
      image: wordpress:latest
      ports:
        - 80:80
      volumes:
        - ./wp-content:/var/www/html/wp-content
        - ./wp-config.php:/usr/src/wordpress/wp-config-sample.php
    

    When local wp-config.php changes you should delete /var/www/html/wp-config.php from container, docker will copy it again... but it works!

提交回复
热议问题