[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users

WordPress Trac noreply at wordpress.org
Thu Jul 5 12:42:57 UTC 2018


#44458: Catch WSODs and provide a means for recovery for end users
----------------------------+---------------------
 Reporter:  schlessera      |       Owner:  (none)
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  5.0
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+---------------------

Comment (by MKSnMKS):

 Hi schlessera,

 I was referred by **Joy (Joyously)** who replied to my topic at

 https://wordpress.org/support/topic/wp-core-plugin-update-fail-white-
 screen-od-method-to-detect-and-repair/

 to make a comment in your topic here.

 My suggestion in short, is to ;
 a) let the whole process of failure take place.
 b) detect the white screen of death, by using a **server generated page
 request**
 c) check the result of the page request
 d) if the result is bad, then automatically to the recovery process (which
 presently must be manually done)
 e) this retrieves front and back end access to the website, so the admin
 can diagnose from the wordpress dashboard, and authors can carry on
 undisturbed, and (most importantly) the website is back on line.

 I describe several instances where this approach could be used.

 This should be fairly easy to do right now - the fix is known i.e. rename
 the folders of recently updated plugins (but automate the timing/event of
 this process, and use a script to do it automatically).

 e.g.
 for script flow to begin the recovery action
 i) and no action from recent actioning admin
 ii) and 'delay time' has passed
 iii) so automatically have the server send a page request to admin or
 front-end
 iv) detect bad page response to page request, so (if possible) display a
 simple text page (much like the maintenance notice - with an estimate of
 the number of minutes till back online, then run the recovery script
 (below)

 for script flow to recover from white screen of death
 i) search plugins folders for plugins whose folders were altered in the
 last time period
 note - this time period could be set to a user chosen default, or left to
 a system default of the  'delay time (above)' plus 3 hours
 ii) rename all those folders (found in (i)), by prepending
 "Disabled_due_to_WSOD--" to the names of each folder (the main folder for
 each plugin).
 iii) optionally (user chosen setting or leave for prompting during live
 run) send an email to admin, saying what happened and the site should be
 live now.

 The web site should then be back to near normal.

 The first script could be made to be manually run, in various situations,
 and made easy to run by use of a button, for example in cPanel admin "auto
 repair WordPress White Screen of Death", or send a coded email to a
 special email address that then carries out the action.

 Also
 It would be handy to have an **automated system to re-update a failed
 update**, that could be done from the wordpress dashboard after access is
 recovered, or from cPanel by button, which would update the folders
 previously detected as recently altered.
 Precautions may be needed to not loose user's custom settings, or
 database, but they may be able to be scripted also.

 Plugin authors could be invited to supply scripts for recovery in the
 event that their plugin needs to be repaired after after a WSOD event
 (this could be made a requirement at some future time).

 I hope this helps

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list