Sanjeev Sabhlok's notes on technology, hardware, gardening

Recovering from WordPress disaster

WordPress disasters are just too frequent. WordPress is not like an HTML system which is easy to restore.  Wordpress is very vulnerable to all kinds of mishaps. This system is a nightmare!

These are my notes – work in progress.

Troubleshooting the source of the problem

1. Defective .php files

The last time I had a peculiar problem I had to overwrite a main directory (not sub-directory) .php file (I forget which). Everything came back.

2. Plugin incompatibility

A typical problem is plugin mismatch.  When that happens, all sorts of weird things can happen.


1) FTP to the site and rename the plugin folder as something else. This inactivates all plugins.

2) Re-active plugins one at a time and check which is causing grief. Since I have 50 odd plugins this is quite a nuisance.  It pays to DELETE plugins that you are not using. In my case, I'm building this blog post to record all the ones that I'll be using. Everything else needs to be deleted.

3. Upgrade of WordPress does not work properly

I upgraded WordPress (it asked me to do so!) and now I get this msg:  "Sorry, but you don’t have the administrative privileges needed to do this." That was a disaster. I searched the internet and found this solution. 

Go into Themes (under wp-content) to your theme. Within that you'll find 'core' then under /functions you'll find  the functions_library.php file. 

Open the file for editing.
You will see 

function checkauthority(){
if (!current_user_can('edit_themes'))
wp_die('Sorry, but you dont have the administrative privileges needed to do this.');


Replace it with

function checkauthority(){
if (!current_user_can('edit_themes'))

This worked for me. I find this whole WordPress thing such a mess, but one has to learn to live with it.

4. Funny characters in the blog after upgrade

Here's a solution.

5. System crash

Even these solutions might not work.So you might need to restore the entire blog from scratch, or even to delete and reinstall it completely. Should that happen you'll need full backups including FTP backups.


I've built a backup system for the blog through Amazon S3. I still don't know how to use the backups, but here is the post that describes it.

Locked out of the blog!

Here's what to do if you are locked out of the blog.


View more posts from this author

Leave a Reply

Your email address will not be published. Required fields are marked *