The Docker image for WordPress contains a property called “WORDPRESS_CONFIG_EXTRA”, this allows code to be passed directly to the wp-config.php file. This is great because you can fully customize your WordPress wp-config.php file.

Queryable Variable for Enabling Debug

My normal PHP code will not work:

The trick to getting this code to work is escaping the “$” in Docker. This can easily be done by using double “$$”.

Docker Compose File

This attribute can also be utilized in the Docker Compose file.