Wednesday, March 8, 2017

Trouble-shooting a Word Press site

You can image my surprise this morning when I found an email alerting me that my business site was down [A Better Computer, Inc] and had been for 6 hours!
[Kudus to for their timely email!]

I visited the URL: Yep! My site was a blank page....

I tried to log into my WordPress admin account
Grrr! It was down, too. There was no login box...

I was able to log into my cpanel dashboard. Whew!

At least I found a place to start trouble-shooting before reaching out to tech support at my Internet provider. 

I opened the file manager, and for the next few minutes these were my favorite buttons:
  • Sort by date
    (a second click will put the newest folder/file at the top)
  • Open folder (Drill down)
  • "View" File 
  • Go "Up One Level"

The error_log file was the newest in the list, and it had been updated (written to?) just a couple hours ago. All I saw was a blank screen when I tried to "View" the file from the cPanel toolbar.

The next newest item was a folder: /wp-content/. Its date-time stamp matched the time my site was reported to have gone down. Drilling into this folder, I found 7 directories and two files. I sorted them by date:

  1. public_html/wp-content/index.php |  2012, Jan
  2. public_html/wp-content/ai1wm-backups | 2016, August
  3. public_html/wp-content/wp-cache-config.php | 2016, August
  4. public_html/wp-content/uploads | 2017, January
  5. public_html/wp-content/themes | 2017, February
  6. public_html/wp-content/updraft | Yesterday
  7. public_html/wp-content/wflogs | Today, 6 hours ago
  8. public_html/wp-content/plugins | Today, 4 minutes later
  9. public_html/wp-content/upgrade | Today, 4 minutes later

This was my first inkling that an automatic Wordpress plugin upgrade was probably the root my problem. 

The public_html/wp-content/upgrade directory was empty and was quickly eliminated. 

The public_html/wp-content/plugins folder had over 40 directories. Again, I sorted by date/time and found only two folders had been modified today, 2 directories yesterday, and the rest from last month or earlier. The last two directories were:
  • google-analytics-for-wordpress
  • insert-headers-and-footers
[Side note: I maintain an Excel spreadsheet that lists every plugin I install. On each site, I indicate if it's installed, and if installed whether it is activated. When I opened my Excel file, I found that google-analytics was installed but not activated, and headers-and-footers was both installed and activated. Hmm.....]

I believe I found a likely source for my problem!

I drilled into the insert-headers-and-footers folder. There were two subdirectories, one readme.txt file, and a php file.

Using the Manager tool in cPanel, I renamed the php file by adding "xx-" to the front of the name.

I opened a new tab in my browser, and VOILA! my site was alive again. I was even able to log in with my WP administrator account.
("The Hills Are Alive" from The Sound of Music is playing gently in my mind.)

My next task is to figure out why I used that particular plugin, and if I even need it. It's been months since I've played with plugins on this site, and this is the only site where I've used it.  But at least my Internet shingle is hanging out there again.

  • I was notified my site had been down for 6 hours
  • I was unable to open the site in a browser window
  • I was unable to log in with my WP administrator account
  • I was able to log into cPanel
    • I searched for files by date
    • I found a likely suspect; I renamed the PHP file from ihaf.php to xx-ihaf.php
  • There is still follow-up work to do.
    • Do I need the plugin? (see if I can find/upload an older version of the file to check the settings.)
    • Update my Excel worksheet
Trouble-shooting is mostly attitude, which motivates someone to start looking to fix something. In this case, I wanted log into my administrator account, and the only one that would let me in was cPanel. Once there, I had to find the area to begin. A problem like this wouldn't have been associated with cPanel email; the obvious tool to start with was the cPanel file manager.  If this was unsuccessful, then the SQL databases would likely have been my next area to explore.

Kudus to for their timely email!

No comments:

Post a Comment