Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stracker-phil/wp-no-white-screen
Got a white-screen-of-death in WordPress? Use this file to display the error!
https://github.com/stracker-phil/wp-no-white-screen
Last synced: 3 months ago
JSON representation
Got a white-screen-of-death in WordPress? Use this file to display the error!
- Host: GitHub
- URL: https://github.com/stracker-phil/wp-no-white-screen
- Owner: stracker-phil
- License: gpl-2.0
- Created: 2015-01-12T14:43:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T09:40:03.000Z (almost 5 years ago)
- Last Synced: 2024-07-31T01:46:43.858Z (4 months ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 109
- Watchers: 7
- Forks: 48
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-no-white-screen
This plugin helps troubleshoot issues with the infamous WordPress WSOD (White Screen of Death). Most errors can be caught with WP-DEBUG turned on using tools like X-Debug, but some of the fatal errors don't come through either with WP-DEBUG or your PHP error handler. This is because PHP lets WP "handle" the error - the way WP handles an fatal error is to not display it [to increase security, since error messages often reveal information that can be used to leverage an attack on a site]
Plugin developers and advanced users who troubleshoot complex issues will find this tool handy. No more messing with your PHP configuration or blind-testing to find out what's going on!
# Usage
* Open up the `/mu-plugins` folder in your WordPress Directory (or create one) usually located within `/wp-content` folder in your `/public_html` folder. Select the PHP file `no-white-screen.php` and place it into the `/wp-content/mu-plugins` folder in your WordPress Directory. You will have all errors displayed or wrriten to log depending on your settings in the next step.
* Open the `wp-config.php` file in your root Wordpress installation and make these changes
```
// Comment this out or change to true
// define('WP_DEBUG', false);define('WP_DEBUG', true);
// If you want to write to log
define('WP_DEBUG_LOG', true);// If you want to hide errors from users (Used mostly for live sites)
define('WP_DEBUG_DISPLAY', false);// Just in case
@ini_set('display_errors', 0);
```Further Reading
* [The WordPress Codex](http://codex.wordpress.org/Debugging_in_WordPress)
* [Other Cool Options](http://nacin.com/2010/04/23/5-ways-to-debug-wordpress/)
* [Step by Step Instructions](http://fuelyourcoding.com/simple-debugging-with-wordpress/)**Tip:**
If you still don't see any errors, then it's likely that there's something fundamentally wrong with WordPress. You should start debugging `/wp-settings.php` by adding breakpoints and identifying the last execution point(or line).
**IMPORTANT** *Remember to remove this file again after debugging the error!*
Leaving it will cost your server valuable performance and can also expose error information to the public, which decreases your site's security.