core – How do I change the PHP version to 8.1 in wordpress-develop?

I want to install wordpress-develop, but it gets installed with php 7.4.32.

How can I use PHP 8.1?

I can’t find where this version is assigned, the closest I get is https://github.com/WordPress/wordpress-develop/blob/trunk/docker-compose.yml#L34

##
# The PHP container.
##
php:
  image: wordpressdevelop/php:${LOCAL_PHP-latest}

But then, LOCAL_PHP seems to be the latest too: https://github.com/WordPress/wordpress-develop/blob/trunk/.env#L18

# The PHP version to use. Valid options are 'latest', and '{version}-fpm'.
LOCAL_PHP=latest

Any ideas on how to make it use 8.1 when installing the container? Thank you!

Leave a Comment