kd4ttc
kd4ttc

Reputation: 1205

Error log not showing up in my WordPress installation

I get this error message when I try to put a comment on my site: The site is experiencing technical difficulties.

The error message shows up when a user tries to add a comment at my site www.ibdpage or when they try to register.

To track this down I have tried to look at the log file, but I can't get the log file to get written.

I put the lines in wp-config.php:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', '/public_html/ibdpage/wp-content/debug.log' );
define( 'WP_DEBUG_DISPLAY', false );

Also, the ibdpage.com site is a subdomain of my site napervillegi.com. It is one level deep in the file hierarchy. I have tried both using true or the path to the debug.log file as the argument to define('WP_DEBUG_LOG',...) and it failed both ways.

Meantime, what do I need to do to find out why the error log is not being generated?

Upvotes: 0

Views: 209

Answers (2)

Ravi Kumar
Ravi Kumar

Reputation: 443

define( 'WP_DEBUG', false );

Its already in wp.config.php file

You just need to change it like

define( 'WP_DEBUG', true );

If still you are not able to see the error while adding comments

then add this below line in theme at the top of functions.php file at

ini_set('display_errors', 1);

Hope it will work Thanks

Upvotes: 1

entreprenerds
entreprenerds

Reputation: 1037

Start with the simpler:

define( 'WP_DEBUG_LOG', true );

If that is still giving you the "site is experiencing technical difficulties" error, temporarily rename your .htaccess file to ensure there are no strange rewrites causing an issue. This should at least get the logs being written to /wp-content/debug.log inside of this WordPress install.

Regarding the full path however:

define( 'WP_DEBUG_LOG', '/public_html/ibdpage/wp-content/debug.log' );

When accessing the filesystem, even though /public_html/ might be the highest you can go in the file structure of your cPanel account, often you need the full path, which would be something like this:

define( 'WP_DEBUG_LOG', '/home/accountname/public_html/ibdpage/wp-content/debug.log' );

Look for Home Directory in your cPanel or File Manager to discover the correct path.

Upvotes: 0

Related Questions