I have a requirement, where my content developers need to add a few custom define()
in wp-config.php, which we cannot accommodate for them to do it independently. To get around this issue, I added this:
require_once(ABSPATH . 'wp-content/wp-extra-config.php');
at the bottom of the wp-config.php, for them to put all the custom defines in there but looks like it’s not working. if I move, e.g. define('DB_NAME', 'myDB');
from wp-config.php to wp-extra-config.php, it works just fine. But, for example, in one of the theme’s functions.php
, they have something like this:
if( !defined('PROD') || !PROD ){
add_action( 'wp', 'personal_message_when_logged_in' );
}
to force redirect to login-page and define('PROD', true);
is required in wp-config.php to bypass that. But if I move that to wp-extra-config.php, it doesn’t work at all – any idea what’s going wrong or what am I missing? Or, is there a way to do it?
Thanks in advance! Best!