Recovering a broken wordpress website

I look after around 100 wordpress websites. I visit each at least once per quarter and check that the sites are up to date, that the backup process is working and I also take an independent backup at that time, which is stored locally on my systems.

If I find anything not working, partially working or not updated, I investigate why and resolve it.

While most sites are behaving themselves, these are the problems I have found which affect under 5% of the sites I am managing:

  • Plugins have ended up deactivated
  • The site is out of date with more than one update pending
  • The backup process has failed
  • The white screen of death
  • Server error codes

Plugins deactivated

Very rarely I come across a situation where a plugin (a component of your installation) is deactivated. This may have occurred for several reasons; a failure during the update process, someone deactivated it or I deactivated it for some reason such as an incompatibility between plugins. If I have found a problem I will generally let you know.

Unless you are working on something, the plugins on your site should all be activated, or if they are no longer needed removed.

How do I check?

Login to your site and check the Plugins option on the menu. Look through the list of plugins (you do not need to know what they are doing). Enable them all, or if you are not sure contact me.

Did you add something?

I do not prevent people from adding Plugins, and the majority of people stick with the ones I have set up. I am very careful about the plugins I add. They need to be supported, and score at least 4.5 stars, and the number of downloads needs to exceed 20,000. This means that users respect the authors work, and the authors are maintaining them. There are literally 10’s of thousands of plugins, and most are not that well rated, or used and may have bugs or poorly implemented code. If you have added something and your site is now misbehaving let me know and I will check it out for you.

Updates are pending

Your site should contain a plugin (there are several) that updates the website automatically when a new update is available. The most common one I use is called Advanced Automatic Updates. This has always proved to be the most reliable too. In order for an update to occur a check is made once per day to compare the versions on the website in the hosting and the versions in the online repository. If a difference is detected the site should update itself.

The settings should update the following in all cases:

  • Major and minor versions of plugins
  • WordPress Core
  • Themes

There is an underlying process running on the server called Cron. This controls when the checks are made. If this is not running or there is a problem then the fact that the site is not up to date is a symptom.

How do I check?

Login and go to the Dashboard and then to the Updates page. It is quite common to see one or two pending, but if you see more than that, it may indicate another problem.

In each case manually update the elements on the page until everything is up to date. Check back in a week’s time. If there is another list of outstanding updates let me know and I will check what is going on.

Backup process has failed

This occurs because the website is now much larger than it was originally. In each case a backup is created of your website either once per week or once every two weeks. (In the latter case this reflects sites that are not often changed).

There will be up to 6 weeks worth of backups recorded on the site. Depending on your settings these backups will either be in the hosting or external to the hosting in an independent location such as Dropbox or similar.

Full Size Images

Without exception, the number one cause of this type of failure is because the website owners have been uploading full size images to the site. Typically straight off of the camera. I have recently dealt with one site that had grown from 90MB to 512MB in just over a year because the images were full size (which can be 50 times the size they need to be).

Images need to be no larger than the space they occupy on the screen. Typically this is under 1024 pixels wide, and 800 pixels high. Often smaller than this. They also need to be under or close to 100KB, and not 5MB. See my tutorial on handling images on a site.

Introducing WP Smush

One relatively painless fix is to download and install the plugin WP-Smush. With this installed you can resize the images in your media library and recover space. It can also be set up to check any new images and resize these too. See my article on WP Smush. 

If you are a photographer, or critical of images on a website, do bear in mind that using an automatic process for reducing image memory size can also lead to images becoming softer with visual Jpeg artifacts appearing (these are visible changes in the image, generally around edges introduced because of the compression process). For most people it will not matter. If you really care about image quality, manually check your images before uploading them.

Weight loss and exercise

Another cause is one that I rarely see, but can be an issue over time; a bloated site. This is where the site is regularly updated and it has organically become very large. I have one of these here: http://prestwoodva.org.uk. In this case the site has things added every week, the site is run by three or four volunteers. It has been running for nearly 4 years. We now give it a hair cut every quarter to save space. In this case the backup is over 500MB.

We review old articles for their relevance, and if they are no longer needed we remove them AND remove any images from the media library. It is generally the images that are taking up the space, not the text.

White Screen of Death

I have no doubt that some of you have skipped down to here to find out what this is!  Most will be familiar with the Microsoft Windows Blue Screen of Death which basically means that the operating system has failed. The only way to resolve this was to restart the computer. Fortunately it is not very common these days. WordPress has something similar called the White Screen of Death.

WordPress is basically a script or interpreted program that runs on the server. It can be very large and complex. It is normally very robust, but very rarely it can stop running because of a problem. If this happens you will not see your website. You will see a white screen with some strange text at the top of the screen indicating the line in the script where the system failed. I have seen this only 4 times over the past 5 years. I saw one yesterday while checking a site, so thought it might be worth mentioning.

It can happen for a number of reasons:

  • It has simply crashed because of an out of date element in the site, or an incompatibility has been introduced.
  • A hacker has got into the site and screwed it up, probably by accident.
  • An update process was interrupted for some reason and did not complete. Possibly due to a temporary problem at the hosting.

Don’t Panic

It may look really bad, but the chances are your site is still there, and can be recovered.

Can you login?

Try logging into the the site. If you still get a line of script at the top of the screen and nothing else, then additional action needs to be taken. If you can login to the site, try disabling the plugins. It is likely to be one of these that is causing the problem. Also check that your installation is up to date by going to the Dashboard, Updates item on the menu. You can generally recover the site from here.

I cannot login!

Well, still don’t panic, all is not lost. What has happened is a plugin has stopped the site from functioning. We have to use another method to get into the site, disable the plugin and then login once the site is working.

You need the hosting control panel login to access your site and password. Some of you have this somewhere, each account is unique, and you can control your own hosting space. If you have not got this information, please contact me and I will provide it.

Then follow these steps:

1). Note the cryptic message at the top of your screen, copy it somewhere so you can refer to it.

2). Look for …../wp-content/plugins/**********/………………..  Note the text that appears where the stars are. This is a clue as to what is causing the problem. It will most likely be because of a plugin in the plugins directory.

3). Go to your control panel. Generally you get there by going to the following URL:  http://mywordpresssite.org.uk/cpanel/  (substitute “mywordpresssite.org.uk” with your domain name. This will take you to a secure login for the control panel.

4). Login using the control panel User name and password I have provided. DO NOT USE ANY OTHER USER NAME OR PASSWORD OTHERWISE YOU WILL BE LOCKED OUT!  The user name and password is not the same as the one you have for your website. If you are not sure, contact me.

5). Look for file manager and navigate to the root of your site in the /public_html  folder, and then look for wp-content, click on this to go down a level and then click on plugins to go to the plugins folder. You should be at a screen similar to the one below:

Look at the folders on the right. One of these will be similar text to the one you identified in the broken script.

6). Highlight the folder and click on the rename icon at the top of the file manager screen. Modify the file name by adding an additional character, for example “_” so “googleanalytics” becomes “googleanalytics_” and press enter.

This means the script associated with this plugin will not run, because it cannot be found. If the problem was caused by this script, it is no longer running and you should find your site has reappeared and you can login.

7). Check your website by going to it with the normal URL. If you can get to it, login. Go to the Dashboard, Updates page and make sure your site is up to date. If it is not, update it all.

8). Return to the file manager you were using and remove the additional character from the folder name. Press enter.

9). Go back into the admin area of your site and recheck for updates. It is quite likely that there is an update for the failed plugin. So update it. Check the site is running. If it is you have recovered your site. Well done!

10). If not check if the script that is stopping your site from working is the same one. If it is change the name again.

11). Go back to the login for your site, go to the plugins page and try to reinstall the plugin. This would pick up a fresh copy of the plugin (also the latest version). See if that resolves it. If it does, delete the old folder (the one where you changed the name).

12). If none of this works, contact me; do tell me precisely what the problem is, what you have done about it, and any relevant facts about the site prior to the problem occurring. Especially if you were doing something at the time.

Server Error Codes

Sometimes you may see a server error code accompanied by some text to indicate that the webserver has failed in some way. If you are not sure check whether you can get to one of these sites: wingrove-media.com or wingrove-services.co.uk. Both run in the same hosting you are using. If one or both are down then this is a server issue, not a website issue.

The hosting company do not provide 24 x 7 x 365 coverage. (100% guaranteed uptime is very expensive). The hosting is taken offline from time to time for short periods of time for maintenance. If a server error occurs the hosting company will be aware of it and will generally resolve it in less than 30 minutes. I will generally be aware of this situation before you are, however if the symptoms persist for more than 1hr please contact me and I will check it for you.

 

 

 

Leave a Reply

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

Wingrove-Services
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

My privacy policy can be located here: Wingrove Media Privacy Policy (opens in a new window)

My Cookies Policy can be found here: Wingrove Media Cookies Policy (opens in a new window)