

Enable WordPress Debug Mode - Pine
source link: https://pineco.de/snippets/enable-wordpress-debug-mode/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

We use cookies for commenting and analytics. For more details, please visit our privacy page.
WordPress debug mode enables us to see the errors when we develop. It is a necessary step when building something new to be sure that our code works well.
To turn on the debug mode, we have to set the WP_DEBUG constant in the wp-config.php to true:
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
We can also set up (also in the wp-config.php file) where we want to see the errors and warnings, in a log file or on the site:
// Debug logging into a separate file (/wp-content/debug.log)
define('WP_DEBUG_LOG', true);
// Disable error and warning display on site
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
We can also load the development versions of the core JS and CSS files to simplify debugging:
// Load the development versions of core JS and CSS files
define('SCRIPT_DEBUG', true);
The fully enable a manageable WordPress debug setup use the following code:
// Enable WP_DEBUG mode with logging
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
define('SCRIPT_DEBUG', true);
Note that you can also use it on a live site because the messages are only shown in a log file.
Need a web developer? Maybe we can help, get in touch!
To see and write comments, you must allow the related (Disqus) cookies. For more information, please visit our privacy policy page.
Need a reliable, small web developer team? Try us! We develop with Laravel and Vue.js.
Recommend
-
53
Open StartupShould I Publish my App to Betalist?And is it worth the $129 price tag?9/13/2019
-
19
Outer Wilds: Stop and Smell the Pine Trees What originally began as a thesis project more than six years ago between two university students—Alex Beachum and...
-
5
Detect the End of Transition and Animation with JavaScriptTo make this site work properly, we sometimes place small data files called cookies on your device. Most big websites do this too. Our Pr...
-
5
Design systems are all around us, but it is still hard to specify what it is. At some point, we all use a system (on different levels), but because it is resource-intensive, we usually don’t have the luxury to work on one.
-
13
Pine Labs ramps up play in payment gateway business with Plural
-
7
Home Chevron iconIt indicates an expandable section or menu, or sometimes previous / next navigation options.
-
10
[RECOVERY][3.3.1-0] TeamWin Recovery Project for Xiaomi Redmi 7A [pine][UNOFFICIAL]
-
13
获Pine Labs投资后,Mosambee估值将突破1亿美元2022/04/15 19:59|
-
9
Who needs heroes when you have thieves? — Chris Pine is a wise-cracking bard in D&D: Honor Among Thieves trailer "We didn't mean to unleash the greatest evil the w...
-
12
New Mexico’s Beloved Pinyon Jay Is Losing Its Pine HabitatA Western landscape’s namesake bird is threatened by climate change, and perhaps by wildfire prevention tactics that thin out the trees they rel...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK