chriszarate / docker-compose-wordpress

An example Docker Compose setup for WordPress plugin or theme development.
162 stars 54 forks source link

How to set WP_DEBUG to true #20

Closed MikeiLL closed 3 years ago

MikeiLL commented 4 years ago

I'm still a little confused about this old issue with how WP_DEBUG works in this project.

docker-compose run --rm wp-cli wp config set WP_DEBUG true
Starting mycool_mysql_1 ... done
Error: Could not process the 'wp-config.php' transformation.

I can change permissions in the wordpress container to, say, 777. Then the commend succeeds, or thinks it does.

However:

docker-compose run --rm wp-cli wp config set WP_DEBUG true
Starting mycool_mysql_1 ... done
Success: Updated the constant 'WP_DEBUG' in the 'wp-config.php' file with the value 'true'.
✔ ~/Docker/WP/mycool [master|✚ 3…4] 
15:22 $ docker-compose run --rm wp-cli wp config get WP_DEBUG
MikeiLL commented 3 years ago

WORDPRESS_DEBUG: "true" added in the environment section of the wordpress service, followed by docker-compose up -d --build wordpress. Submitted a PR.