How to update wordpress on docker

后端 未结 5 555
再見小時候
再見小時候 2021-02-06 07:36

I\'m running a php-fpm wordpress container.

The wordpress source files are mounted in a named volume "wordpress" shared with the Nginx container.

Everyth

5条回答
  •  庸人自扰
    2021-02-06 08:38

    Wordpress seems to have addressed this under this issue.

    I notice you are using a custom wp-config.php. Most likely, you can use the WORDPRESS_CONFIG_EXTRA for this rather than mounting wp-config.php.

    Theoretically (per the link above), updating the image should update the database, but I have not confirmed.

    Based on this, my stack.yml/docker-compose.yml looks like this:

        environment:
          WORDPRESS_CONFIG_EXTRA: |
            define( 'AUTOMATIC_UPDATER_DISABLED', true );
        volumes:
          - "./themes:/var/www/html/wp-content/themes/"
          - "./plugins:/var/www/html/wp-content/plugins/"
          - "./uploads:/var/www/html/wp-content/uploads/"
    

提交回复
热议问题