{"id":54,"date":"2023-08-24T12:53:06","date_gmt":"2023-08-24T12:53:06","guid":{"rendered":"https:\/\/sitebuilder.live\/docs\/wordpress\/enabling-debug-mode\/"},"modified":"2023-08-24T12:53:44","modified_gmt":"2023-08-24T12:53:44","slug":"enabling-debug-mode","status":"publish","type":"docs","link":"https:\/\/sitebuilder.live\/docs\/wordpress\/enabling-debug-mode\/","title":{"rendered":"Enabling Debug Mode"},"content":{"rendered":"\n

WordPress provides a debug tool to help debug an error on a website.<\/p>\n\n\n\n

Enabling debug mode will display information on a live website which is visible to visitors. If you are debugging a live website, we recommend creating a debug log file instead of enabling debug mode.<\/p>\n\n\n\n

To enable WordPress debug mode:<\/strong><\/p>\n\n\n\n

    \n
  1. Go to File Manager for the website, or use SSH to open the wp-config.php file<\/li>\n\n\n\n
  2. Scroll down to the bottom of the file and add the following:-<\/li>\n<\/ol>\n\n\n\n
    define('WP_DEBUG',true);\n<\/code><\/pre>\n\n\n\n

    This will enable WordPress debug mode, to allow you to see a greater level of detail on any errors. It sets PHP errors to E_ALL which includes all errors, warnings, notices and deprecated errors, not all of which are necessarily relevant to a broken site but should be taken in context.<\/p>\n\n\n\n

    To enable and view the WordPress debug log file:<\/strong><\/p>\n\n\n\n

    This will enable the debug log file, and the default log file location will be public_html\/wp-content\/debug.log<\/strong> This will disable<\/strong> displaying the debug information on the front end. Edit the wp-config.php file and add the following lines to the end:-<\/p>\n\n\n\n

    define('WP_DEBUG_DISPLAY',false);\ndefine('WP_DEBUG_LOG',true);\n<\/code><\/pre>\n\n\n\n

    <\/p>\n","protected":false},"featured_media":0,"parent":53,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"_links":{"self":[{"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/docs\/54"}],"collection":[{"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":1,"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/docs\/54\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/docs\/54\/revisions\/55"}],"up":[{"embeddable":true,"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/docs\/53"}],"wp:attachment":[{"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sitebuilder.live\/wp-json\/wp\/v2\/doc_tag?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}