-
Jones publicou uma atualização
Como atualizar o WordPress e o PHP em uma configuração do Docker
Imagem Docker
Instalei o WordPress com o Docker guiado por este tutorial:
https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose
O tutorial está a utilizar isto
docker-compose.yml
file that is usingwordpress:5.1.1-fpm-alpine
image:version: '3' services: db: image: mysql:8.0 container_name: db ... wordpress: depends_on: - db image: wordpress:5.1.1-fpm-alpine # <-- Note the WordPress version here container_name: wordpress ...
Outdated WordPress version
Now, I have to install some plugins, but they are requiring some newer versions of the WordPress. Like the WP phpMyAdmin plugin:
This plugin doesn’t work with your version of WordPress. Please update WordPress.
The WordPress dashboard is displaying update notifications too:
WordPress 6.7.1 is available! Please update now.
Try to update
But when I click on the
Please update now.
link, I receive this error:You cannot update because WordPress 6.7.1 requires PHP version 7.2.24 or higher. You are running version 7.2.18.
Question
How can I reliably update the WordPress along with PHP? I don’t want to mess up the whole Docker setup.
digitalocean.com
Como instalar o WordPress com o Docker Compose | DigitalOcean
O WordPress é um Sistema de Gestão de Conteúdos (CMS) gratuito e de código aberto que é amplamente utilizado para lançar novos sítios Web. A execução do WordPress normalmente envolve a instalação...
Bandeira-
First and foremost, wordpress:5.1.1-fpm-alpine doesn’t seem to be an official WordPress image. These are always kind of hard to maintain, easy to set up, but a whole lot of headache to maintain. Anyway, to do such an upgrade, you will have to upgrade wordpress and php inside the container as well as their dependencies, goodluck with that! A better approach would be to create a backup of everthing (do a snapshot of the entire server if possible). Then run a new version of wordpress locally using a restored copy of the db, once everything works, you can use a newer image with that data.
-
@banner I backed up the Docker named volumes. Then I updated the Docker image version, but the website threw 500 error. Then I restored the backup volumes. But website throws Error establishing a database connection error. Looks like updating WordPress & PHP by Docker might be a hassle even with backup/restore of Docker volumes
-
-