I am standing up a new WordPress site over at Digital Ocean. I followed [this (excellent) guide]) to set up MySQL 8, WordPress, Nginx, and CertBot. Everything is installed, and I completed the basic WordPress setup.
The WordPress dashboard informed me of two issues, that WordPress was out-of-date and that I was using an older, insecure version of PHP.
My docker-compose file calls for this docker image of WordPress: “wordpress:5.1.1-fpm-alpine”. While I realized I could update WordPress from the GUI, I thought PHP would have to be updated by getting a newer docker image. I updated my docker-compose file to “wordpress:6.1.1-fpm-alpine”, thinking I would see if the PHP version was updated, and if not, I’d try one of the images that specifically list PHP8.x.
When I recreated my wordpress container, the site no longer loads. I checked the WordPress logs and I see this error (repeated many times)
docker-compose logs wordpress
Attaching to wordpress
wordpress | [13-Jan-2023 17:09:12] NOTICE: fpm is running, pid 1
wordpress | [13-Jan-2023 17:09:12] NOTICE: ready to handle connections
wordpress | NOTICE: PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /var/www/html/wp-includes/script-loader.php on line 706
…
Am I correct that you cannot update the container image and expect the site to continue to function? If so, what’s the process for updating components outside of WordPress itself? I may move away from a Docker install if the benefit of updating the container easily isn’t really an option.
[ad_2]
I think you need to update your version of PHP. A version of 7 was recently deprecated.