How To Recover From A WordPress Update Failure

by | Jul 1, 2018

There are  many scenarios that might result in a WordPress update failure.  In this article I want to cover my experience regarding this topic.  Keep in mind that if your website is created by Persson Technologies you can purchase our pre-paid maintenance package.  This means that every week we will backup your website, install all the latest updates, scan for malware, and thoroughly test your site to verify everything is working! 

On May 26, 2018 at 1:00 in the morning I wanted to quickly apply all the updates to my website before going to bed.  Typicially on Friday nights I like to install all the updates and perform  malware scans so Saturday morning I can devote my time to other issues.  Here I am supplying a screenshot of how my site appeared when I began.
Starting Website
In a previous article here I discussed the importance of backups and how to schedule your sites for automated backups.  Since I was in a hurry on this early Saturday morning I did not perform a backup (after all, what could possibly go wrong?).  Also, my automated backups are scheduled to run every Saturday during the day.  I should really revisit the timing of these backups.  
After the theme update when I attempted to display my website or access the dashboard, this is all that was displayed in the browser window.  My website was gone! (This is not actually how mine appeared, this is an example I found on the web.  Next time I encounter a similar situation I will need to get some screenshots).
Header Error
The most important tip in this case is DON”T PANIC!  You do not want to start modifying things without a clear plan as you might quickly make things much worse!  In my error message it indicated there was a problem in the header.php file in the child theme.  By design an upgrade does not touch anything in the child theme.  Therefore, something changed in the parent theme that caused the header.php file in my child theme to become invalid.
I simply renamed the file to something random to keep WordPress from using the header.php file in my child theme.  When the system could no longer find the file it would revert to the header.php file in the parent theme.  After I did this and refreshed the page, my website was back…..sort of…..
Blurb Icons
However, there were many issues.  The dashboard and website did not look right, everything was shifted around.  Also on the main page the blurb icons shown in the previous screenshot were completely scrambled.  It was as though each icon was split into the lines and curves that needed to be combined to create each icon.  (Again, I did not think to create a snapshot when the sky was falling.) 

Consequently I determined my Divi theme was completely corrupted and needed to be replaced.

My first step was to use the dashboard to switch my site to another theme such as Twenty Sixteen.  (If you cannot get into your dashboard you can rename your current theme directory – when WordPress cannot find it the system will revert to another theme.)  You might not want to look at your website at this point because without Divi magic it will appear somewhat scrambled as shown in this screenshot.
Website Without Divi
Next I copied the Divi-Child directory from the website to my local hard drive.  Then I completely deleted the Divi and Divi-Child directories from the server.

I re-installed the Divi theme from the Elegant Themes website (because I have a developer account there).  Then I replaced the Divi-Child directory, and renamed the header.php back to the original name.

Finally I switched the theme back to the Divi-Child as shown in the next screenshot.

Activating Divi Child Theme
The website at this point was almost back to normal but some items were still not displaying correctly. They looked great in the visual editor but not when I viewed the website in standard mode.  I cleared out the browser cache and therefore everything was restored as shown here!
Starting Website


It is especially relevant that I upgraded three other websites with the same theme in this same session and nothing went wrong with those updates.  I concluded that in this isolated case the theme was somehow corrupted during the download process.  Therefore, this could happen to anyone at any time.  Since it is very important to update your theme on a regular basis to guard against malware, this article stresses the true value of our prepaid maintenance package.  On a weekly basis we will backup your website, apply all the updates, scan for malware, and test your website to verify that everything is working.

Contact us today if we created your website and you would like to take advantage of the prepaid maintenance package.