Enable or disable Wordpress debug.
npm install wordpress-debug --save-dev
const wordpressDebug = require('wordpress-debug').default;
wordpressDebug('path/to/wp-config.php'); // Enable debug
wordpressDebug('path/to/wp-config.php', true); // Enable debug
wordpressDebug('path/to/wp-config.php', false); // Disable debug
Returns a Promise
.
Type: string
Required: true
Path to wp-config.php
.
Type: boolean
Default: true
Required: false
Enable or disable debug.
Feel free to push your code if you agree with publishing under the MIT license.