No Error Log File, no debug info

The question:

My error when writing a plugin for uploads

and yes, I can debug. But it just jumps directly from this line to destruct

enter image description here

the end of my wp-config.php EDIT:

// Enable WP_DEBUG mode
define('WP_DEBUG', true);

// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

(yes i did restart)

My webcontent folder

enter image description here

So now what?

How do I find out what is the problem?

EDIT it’s not file permission as I can do
error_log("errrorrrr ", 3 , "..../debug.log")

In my plugin I wrote the line

throw new Exception("foo");

I want to get to see the error in my debug.log file

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

Insert this into your wp-config.php

// 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);


/* That's all, stop editing! Happy blogging. */

Method 2

I had a similar issue when the permissions on the upload dir were not allowing the upload, try that first. Take a look at the codex Changing_File_Permissions for more info.

Alternatively, check that the uploads dir is owned by the same user (on the server) as WordPress, it’s also mentioned in the above link.

For how to… please find someone with more experience 😉

Method 3


It seems like your wordpress file is not uploaded, so there may be a possibility for one or more issue, Please read out following and apply these solution one by one:

Large images require more memory to process. Are these images particularly large? If yes then try with small image.

Uploaded folder should have write permission, if not then please grant it.

Need to check uploaded directory structure having sub folder created with your current setting OR not, if not then try it manually may be this is again folder permission issue.

If above points is not your solution then please use wordpress plugin ‘Debug My Plugin’ with Debug Bar(

It adds a debug menu to the admin bar that shows query, cache and other helpful debugging information.

Also ‘Query Monitor'( is monitoring database queries, hooks, conditionals, HTTP requests, query vars, environment, redirects including automatic AJAX debugging and more.

I hope you find this detail helpful. If you have any query or suggestions to achieve the same result as above plugins does, do share with us.


Method 4

Another thing to check for is where the WP_CONTENT_DIR points as that is where the debug.log file will be put. This can be set in wp-config.php e.g. define('WP_CONTENT_DIR', '/var/www/sites/wordpress/wp-content');. Normally it shouldn’t need to be set unless there’s a non-standard setup. The value of WP_CONTENT_DIR may be checked as suggested in this question, or using the Wordfence plugin->Tools->Diagnostics->WordPress Settings.

Method 5

In my case, I use XAMPP to host WordPress, the log will be in Apache’s error.log instead even I have wp-config.php configured.

No Error Log File, no debug info

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment