(I may receive commissions from the links in this post. For more informations read my Disclosure.)
Some time ago a very good friend of mine called me and said: “It’s dead.”
She was talking about her WordPress installation.
I just asked:
“What? What happened? I am not sure if I understand.”
“Look, my website, I changed some things and now it seems to be gone.”
She’s experiencing one of the dreaded
“White Screen Of Death”
Which means your site might even somehow still working, but parts are just white. No source code. Nothing.
This might occur when you try to log in, after you’ve logged in, or pressing some buttons or even some pages.
The worst case to encounter:
Your domain. Your complete site.
I can relate what she might be experiencing this very moment.
One time I forgot to close a tag or a matching bracket and thought my design is broken as well.
So if this is your business online your loosing serious money.
So you need a solution.
To ease your worries a little bit right now:
You’re not alone. Almost every longterm using WordPress user has encountered this once in a while.
First, we have to identify the source of the problem, which might be related to:
This might be the easier ones
Programming or writing related
- inserted HTML code in a blog post
Internal Infrastructure Related
- FTP files
- server configuration
but it could also be due to a failure in some changes you made yourself.
So the first step would definitely be to identify where the problem is coming from.
Maybe you got the possibility to turn on logging on your host. So you will actually see the error messages.
What could you do now?
Why is this so painful and how does this make you feel?
If guess you’ll experience at least one of these:
Where does this come from?
Easy. Normally your site used to work like a charm.
And now: Like the light has been switched off. Bright white, but the reason for this – the real cause so to say – is hidden in the darkness of nescience.
Painstakingly you dig the net for article after article to find the cause AND the solution for the thing turning your page into
a clean slate of nothingness. Now all the kinds of thoughts will come up like
- What a waste of time
- Gosh I am loosing money (if you were supposed to have a prosper site)
- I f**** hate that sh** always when it’s not the right time (think again, was it ever the right time? – I doubt that very seriously. 😉
I can totally relate that this might be the most excruciatingly WordPress experience you might have had when stumbling across this kind of errors.
Are you totally immersed in the feelings you got now? Don’t suppress them. Dive in.
I know it’s hard. But you’d better learn to be comfortable being uncomfortable.
Are you scared? (of a Bug)
If you never experienced those kinds of problems I bet you know not much or nothing about programming as well in many cases.
Or only the things you used to do to iterate your site and the pages it contains.
WordPress offers several mechanisms to enable you to still get the hang of the cause. If you’re lucky.
WP_DEBUG is one of those in the costume of a PHP constant (a permanent global variable) which normally isn’t enabled.
So you could log in to your page using an FTP client.
It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.
Below is an example:
define( ‘WP_DEBUG’, true );
define( 'WP_DEBUG', false );
change it to:
define( 'WP_DEBUG', true );
Don’t use both lines at once because the last of these types of lines wins. That means the setting will be overwritten.
And normally when you got your site up and running again you should set it back to
define( 'WP_DEBUG', false );
again. Otherwise, any person could get information about your running site you don’t mean them to have anyway.
It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.
This should display everything now. Warnings, errors, info, notices, special messages and events. Whatever.
You might also spot things not working correctly but that is not necessarily the real cause of the white screen of death you’re trying to get rid of. And you will be also informed about obsolete and deprecated functionality. Things that used to work but have been superseded.
So take care.
I know what some of you might think now:
On the one side now you should repair the mess.
On the other side, you should take care.
Really difficult to balance and sometimes not even possible.
This means basically make a backup. The best method I first got in my mind right now is:
Make a backup using an FTP client.
Or you can take another Backup Solution as well.
On the other side, you certainly have to do something about the errors on your page.
BUT if you don’t want to wait until something doesn’t work anymore you can take care beforehand as well.
Just search for a plugin that makes backups periodically.
For example, you could use this one:
As you can see – screenshot below – this gives you the possibility to save backups regularly.
So if you crashed something on your site just get the backup back online.
Note: So for sure it’s well worthy to DOWNLOAD the backups locally to your computer and store them on a safe device.
Otherwise, you might still not be able to access the backups anymore because you can’t access the WordPress interface anyway anymore.
Because it’s broken.
Another possibility existing is the Debug Log you can enable. You will find it in the /wp-content/directory.
Very useful to keep track of what had happened. Maybe it still worked yesterday? You can access the file using an FTP client and there you are.
This enables you to store the protocol to /wp-content/debug.log using PHP’s built in error_log() function, which can be useful for instance when debugging.
define( 'WP_DEBUG_LOG', true );
See above to also enable
define( 'WP_DEBUG', true );
Maybe you applied the changes but still, nothing happens. Nothing that helps at least to solve your problem.
Then you can have a look at
as well. Which is another opportunity to go side by side with WP_DEBUG.
Switch it on to display messages to you inside the HTML of pages.
If you switch it off all things causing problems will be hidden. Also, set WP_DEBUG_LOG to true.
define( 'WP_DEBUG_DISPLAY', true );
Script debugging goes one step further even. This will make WordPress use the "dev" versions instead of the small files.
define( 'SCRIPT_DEBUG', true );
There is another option called SAVEQUERIES which I won’t describe here first because it has a serious impact in terms of accessing speed.
Because the database will be kept quite busy and enlarged. Just tell me if you think that’s the solution you might be missing out when trying to solve your problems when repairing your website.
The next paragraph is an excerpt from the WordPress Page:
Example wp-config.php for Debugging
The following code, inserted in your wp-config.php file, will log all errors, notices, and warnings to a file called debug.log in the wp-content directory. It will also hide the errors so they do not interrupt page generation.// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define( 'SCRIPT_DEBUG', true );
NOTE: You must insert this BEFORE /* That's all, stop editing! Happy blogging. */ in the wp-config.php file
You should definitely have a look at the debugging plugins for WordPress to get a crystal clear picture in terms of what’s happening in the dark.
Have a look at those at least:
What can you do to prevent this for the next time?
Install a plugin that shows the error instead of just nothing.
WordPress itself offers 3 links to show to you
- WordPress ‘wp-config.php’ file Generator
- DeMomentSomTres Debug Plugin when you activate this plugin, WP_DEBUG is automatically set to true and set to false as plugin is desactivated
- ‘No White Screen’ plugin: Display the error instead of a white screen
Outside Page Searching – FTP
Hmmmmmmm just writing about this topic an idea is establishing in my mind.
What do I mean by outside page searching?
All tips before were about searching for things so we could make the page run which requires websites, plugins and so on.
What if you’re not very experienced and you still search for the problem?
I feel it. An idea is growing. One could develop a tool that establishes an FTP connection and THEN search for the things that might crash itself and provides you with some useful information. So anyone could basically find the errors much easier.
I am sure you’d even be willing to pay a certain amount of money, especially if you’re site is part of your daily, monthly or annual income.
Until next time.
Happy blogging and keep your site up.
Tell me your stories.
P.S.: I’ll definitely grow this part of the blog here offering more solutions. But that’s the only things I’ve encountered so far myself.
See you. 🙂