{"id":9664,"date":"2020-01-28T08:14:58","date_gmt":"2020-01-28T08:14:58","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9664"},"modified":"2023-11-03T02:39:54","modified_gmt":"2023-11-03T02:39:54","slug":"complete-reference-of-debugging-wordpress-website-in-linux-in-shared-hosting","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/complete-reference-of-debugging-wordpress-website-in-linux-in-shared-hosting\/","title":{"rendered":"Complete Reference: WordPress Debugging &#038; Troubleshooting Guide"},"content":{"rendered":"\n<p>Any wordpress issues and problem may be caused by a variety of issues, including:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Bad theme<\/li>\n\n\n\n<li>Bad plugin<\/li>\n\n\n\n<li>Bad install\/upgrade<\/li>\n\n\n\n<li>you exhausted the memory limit<\/li>\n\n\n\n<li>It could also mean that there is an issue with your web hosting server such a wrong PHP version, mysql version, Missing or wrong php extension.<\/li>\n<\/ol>\n\n\n\n<p><strong>Part &#8211; 1- Enable debugging mode in WordPress, follow the steps:<\/strong><\/p>\n\n\n\n<p>Edit wp-config.php and add following <\/p>\n\n\n\n<p>define( &#8216;WP_DEBUG&#8217;, true );<br>\ndefine( &#8216;WP_DEBUG_LOG&#8217;, true );<br>\ndefine( &#8216;WP_DEBUG_DISPLAY&#8217;, false );<\/p>\n\n\n\n<p>After reloading the website all WordPress debug errors will be written into the file debug.log which is located in the folder: wp-content\/debug.log<\/p>\n\n\n\n<p>If you want to see the debug log errors directly on the screen instead of having the need to look into the debug.log change WP_DEBUG_DISPLAY to define( &#8216;WP_DEBUG_DISPLAY&#8217;, true );<\/p>\n\n\n\n<p><strong>Part &#8211; 2: Change the location of the debug.log<\/strong><\/p>\n\n\n\n<p>You can change the location of written errors by changing the value of the constant WP_DEBUG_LOG from true to a path of your choice in wp-config.php like so:<\/p>\n\n\n\n<p>define(&#8216;WP_DEBUG_LOG&#8217;, ABSPATH . &#8216;\/logs\/errors.log&#8217;);<\/p>\n\n\n\n<p><strong>Part &#8211; 3: Allowed memory size of 41943040 bytes exhausted (tried to allocate issues<\/strong><br> Edit the wp-config.php file on your WordPress site with following <br> define( &#8216;WP_MEMORY_LIMIT&#8217;, &#8216;256M&#8217; );<\/p>\n\n\n\n<p><strong>Part &#8211; 4: Go to Plugins Manager and Activate and Deactivate WordPress <\/strong>plugins and validate error status.<\/p>\n\n\n\n<p><strong>Part &#8211; 5: If you can install plugins, install \u201cHealth Check\u201d: <\/strong>https:\/\/wordpress.org\/plugins\/health-check\/ On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you\u2019re still logged in, without affecting normal visitors to your site. You can then use its admin bar menu to turn on\/off plugins and themes one at a time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Any wordpress issues and problem may be caused by a variety of issues, including: Part &#8211; 1- Enable debugging mode in WordPress, follow the steps: Edit wp-config.php&#8230; <\/p>\n","protected":false},"author":1,"featured_media":9805,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4957],"tags":[],"class_list":["post-9664","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=9664"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9664\/revisions"}],"predecessor-version":[{"id":41255,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9664\/revisions\/41255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/9805"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}