Support

[DevKit] automatically injects WP constants into wp-config.php

Alexander Senger
Alexander Senger
Publish date: December 27, 2025

When I setup my environment the way I want, I configure it beforehand with configs which I prefer.

Installing and visiting DevKits, automatically inserts these variables without permission or acknowledgement. Thats why I get the error that they are already defined.

define( 'WP_DEBUG_LOG', true);
define( 'WP_DEBUG_DISPLAY', true);
define( 'SCRIPT_DEBUG', true);
define( 'SAVEQUERIES', true);

I use the official docker WordPress image. https://hub.docker.com/_/wordpress

It lets you define extra variables via the env variable:
 WORDPRESS_CONFIG_EXTRA=''
What I would expect is to have something like this or have a check before injecting if they exist already.
defined('WP_DEBUG_LOG') || define( 'WP_DEBUG_LOG', false );
defined('WP_DEBUG_DISPLAY') || define( 'WP_DEBUG_DISPLAY', false );
defined('SCRIPT_DEBUG') || define( 'SCRIPT_DEBUG', false );
defined('SAVEQUERIES') || define( 'SAVEQUERIES', false );

The bigger problem is that they stay active because in my docker config they are always set to active. When I try turning it off, it modifies the value in the wp-config.php file to the correct value but it gets ignored because of the previous defined constant by me.
Maybe if they are already defined set the checkbox toggles to disabled with a hint that they are already defined. Any modification wouldn't have any effect anyway.
  • support says:

    It is not enabled by default, you are the one who can enable it from the settings. Kindly check the docs.

    Regards,
    Arshad
    DPlugins Support

  • Alexander Senger says:

    It is enabled by me that is true (thats why they are switched on) but it also lets me click on the toggles which injects these lines. When I try to disable it I get these warning that the constants are already defined.

    Disabling the toggles when the constants are already defined by the user would be better because toggling it off won’t remove the injected lines. I would have to do it manually.

Leave a Reply