Title: debug not logging to file
Last modified: August 21, 2016

---

# debug not logging to file

 *  [londonnet](https://wordpress.org/support/users/londonnet/)
 * (@londonnet)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/)
 * I have the following code in my wp-config.php file
 * define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);
 * but no out put to /var/www/html/wp-content/debug.log
 * I had to create /var/www/html/wp-content/debug.log
 * touch /var/www/html/wp-content/debug.log
 * Does anyone know why debug information is not logging to file?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217425)
 * Are you seeing any debug output in your browser? (that is, you still have WP_DEBUG_DISPLAY
   set to its default value of true) The file will not be created until there is
   actual debug output. (and WordPress will create it for you if it doesn’t exist)
 * Also, permission issues could prevent the debug.log file from being created and
   written to. I’d double check this, especially since you created it yourself.
 *  Thread Starter [londonnet](https://wordpress.org/support/users/londonnet/)
 * (@londonnet)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217484)
 * I do not see any debug details at the top of my browser.
    I set for the purposes
   of testing my root http directory to 777 recursively Have tested with and without
   debug.log created Selinux in not enabled
 * Is there a minimum package list for wordpress? Perhaps I’m missing a package 
   dependency or some other security setting?
 * Any ideas? I’m trying to debug why I am not able to search themes
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217534)
 * Unless you have set WP_DEBUG_DISPLAY to false, then with the code you’ve placed
   in your wp-config.php should display errors to both the browser and the debug
   log. If there are no errors showing in your browser (generally at the top of 
   the page), then nothing will be saved to the debug file, nor will it create one
   until there are some errors being displayed.
 * Trying to deduce from from you OP what you are trying to achieve. Are you saying
   you can’t search theme from WordPress.org through your WordPress admin?
 * Obviously, you do not want to leave your permissions set to 777.
 *  Thread Starter [londonnet](https://wordpress.org/support/users/londonnet/)
 * (@londonnet)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217570)
 * Changed out my config for this
 *  // Enable WP_DEBUG mode
    define(‘WP_DEBUG’, true);
 * // Enable Debug logging to the /wp-content/debug.log file
    define(‘WP_DEBUG_LOG’,
   true);
 * // Disable display of errors and warnings
    define(‘WP_DEBUG_DISPLAY’, false);
   @ini_set(‘display_errors’,0);
 * // Use dev versions of core JS and CSS files (only needed if you are modifying
   these core files)
    define(‘SCRIPT_DEBUG’, true);
 * No change no debug info.
 * Re not being able to search for wordpress themes I go to [http://myip/wp-admin/theme-install.php](http://myip/wp-admin/theme-install.php)
   and click search
 * I get error
 * An unexpected error occurred. Something may be wrong with WordPress.org or this
   server’s configuration. If you continue to have problems, please try the support
   forums.
 * Try again
 * no debug info
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217574)
 * > An unexpected error occurred. Something may be wrong with WordPress.org or 
   > this server’s configuration. If you continue to have problems, please try the
   > support forums.
 * This error generally means your server cannot make outbound requests. Hosts often
   disallow this for security reasons. In some cases, if you have cPanel, you can
   turn this on.
 * The reason it’s not showing in your debug log is because the particular bit of
   code used in WordPress core to make the request is using the `WP_Error` class
   for error handling, and the message is simply being printed out to the browser
   with an `echo` statement. So there is no actual error that would go to the log.(
   if the code used a `die` statement to stop processing, it might, but in this 
   case it’s nothing more than an `echo` statement displaying the result of the 
   attempt to contact wordpress.org).
 *  Thread Starter [londonnet](https://wordpress.org/support/users/londonnet/)
 * (@londonnet)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217580)
 * The confusing part is I am able to search and install plugins indicating I have
   some access.
 * Do we know where the search feature is pulling data from so I can check access?
 * OK well it looks like the debug part could be working I just don’t have any bugs.
 * Thanks
 *  [Scriptrunner (Doug Sparling)](https://wordpress.org/support/users/scriptrunner/)
 * (@scriptrunner)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217593)
 * It’s possible (and I’m guessing here) that the host blocks all outbound requests
   and then whitelists certain URLs that they allow. The themes and plugins URLs
   are different, so it’s possible the host has already whitelisted the plugins 
   url but not the themes url.
 * The urls being used are:
    - [http://api.wordpress.org/plugins/info/1.0/](http://api.wordpress.org/plugins/info/1.0/)
    - [http://api.wordpress.org/themes/info/1.0/](http://api.wordpress.org/themes/info/1.0/)
 * You can’t call them directly in your browser. (well, you can, but you’ll get 
   an error. The API expects a POST with serialized parameters) But to see if you
   can connect, you can try something like this (assuming you have cURL):
 *     ```
       curl -I http://api.wordpress.org/plugins/info/1.0/
       ```
   
 * and
 *     ```
       curl -I http://api.wordpress.org/themes/info/1.0/
       ```
   
 * That will at least tell you if you can make the connection. If you can, you should
   see output something like this:
 *     ```
       HTTP/1.1 200 OK
       Server: nginx
       Date: Tue, 15 Oct 2013 14:06:36 GMT
       Content-Type: text/html; charset=utf-8
       Connection: close
       Vary: Accept-Encoding
       ```
   
 *  Thread Starter [londonnet](https://wordpress.org/support/users/londonnet/)
 * (@londonnet)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217653)
 * Changed DNS servers and now the performance is much better and thus the pages
   are not timing out

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘debug not logging to file’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [londonnet](https://wordpress.org/support/users/londonnet/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/debug-not-logging-to-file/#post-4217653)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
