Critical issues in site health area

I have issues in the site’s health area

3 Critical issues

“Your site is set to log errors to a potentially public file.

The REST API encountered an error”

  • Ash
    • WordPress Hacker

    Hello Mohamed

    1. For debug log file, you can use some code in htaccess to protect the file, like:

    <Files "debug.log">
    Order Allow,Deny
    Deny from all

    Or you can define a custom path for the debug file:

    define( 'WP_DEBUG_LOG', '/var/www/my_custom_log.log' );

    About rest api, it seems the issue is related to curl. So, would you please contact your host if they have any issue or restriction? Also, ask them if they have any firewall which is blocking incoming/outgoing API connection.

    The loopback request is also dependent on curl, os if the curl issue is fixed, this should be fixed too.

    Let us know how it goes. Have a nice day!



  • Kris
    • Support

    Hi Mohamed

    I apologize for the misunderstanding.

    In your wp-config.php file I change

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


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

    so issue with Your site is set to log errors to a potentially public file is gone now.

    As for The REST API encountered an error I could not see any errors in our server logs so I’m escalating this to our hosting developers to take closer look on this.

    We will post an update here as soon as more information is available. Thank you for your patience while we look into this further.

    Kind Regards,


  • Kris
    • Support

    Hi Mohamed

    I consult this with developers and service was running, but when we try to curl domain its say timeout. Which means as per process status its say running but not doing its actual work.

    One of our sysadmin restarted that service and everything seems working now :slight_smile:

    Hope this help :slight_smile:

    Kind Regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.