When do changes to wp-config.php take effect?

I am trying to enable debugging on a WordPress site to debug a plugin. I read about the WP_DEBUG setting and I added the following to my wp-config.php file:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

My understanding is that I should see a debug.log file in my wp-content directory. I haven’t seen anything yet, but I don’t know if that is because there aren’t any errors that have been logged, or if something needs to be restarted for these settings to take effect. So my question is when are the wp-config.php settings read and do I need to restart any services to make changes take effect.

Related posts

Leave a Reply

1 comment

  1. “Changes” to wp-config.php take place right away when edited by FTP or via the shell, because that file is accessed each time any page is generated and output by WordPress. No reboot of the server is needed; just do a load or a refresh of any front or backend page of the WordPress site.

    Do something to trigger a php error, like removing a bracket from a php function in header.php of the theme and see if that gets logged in debug.log. Check for the error in debug.log in wp-content.

    If the file doesn’t exist, there may be permission problems and WordPress couldn’t create the file. So add a plain text file (with the correct text encoding for your system; it’s best to use the FTP client to create a few file) and title it debug.log. If you create the file locally and upload it, give it at least 755 permissions, but 644 is safer. Then invoke a php error again and see if it gets logged.