- In this video, I'm going to show you how to easily fix your WordPress website if an update breaks it. So you're prompted to update
WordPress to the latest version or maybe some plugins
have updates available. You hit Update. And most of the time, these
updates run without a hitch. Sometimes, just occasionally,
something will go wrong. Maybe something broken on
your site after the update, or even suddenly no site at all, just a blank white screen
where your website used to be. Don't panic. I'm Dave Foy, and in this
video, I'm going to show you exactly how to troubleshoot
and fix problems caused by WordPress and plugin updates. If you find this video helpful,
hit the Subscribe button, and then the little
notification bell below. Okay, let's get on with this. If you've got a problem
caused by an update, well, the ideal thing to do
is diagnose what's caused it, and then fix it. You might not have time
for that right now. You just want to get your site
back up and running quickly, and then come back to it
when you've got more time. If it's an emergency, just restore your site from
the most recent backup. You do have automated
backups running, don't you? Now if your host takes backups, it's easiest just a login
to hosting control panel and hit Restore, job done. Or, it might be, you hit Restore in your backup plugin instead. If you're restoring from a backup plugin, what if you can't access
the WordPress admin panel? Well, all decent backup plugins
provide a way around this. For example, here's how
to do this in UpdraftPlus. And then later, when you have time, you can maybe copy your site
over to a staging version, if your hosting company
has a staging feature, and then run the updates
there again safely, so you can fix the problems
without your live site being down in the meantime. But of course, just
reverting recent backup is a quick emergency fix in a pinch. At some point, you've got to figure out what's causing the problem you're seeing, so that you can fix it. So let's now look at some detective work to narrow down what might
be causing your problem. The vast majority of
problems after updates are caused by plugins. A plugin might clash with
something in the WordPress core, it might clash with your theme, it might clash with another plugin, or it might even just
introduce a whole new problem all on its own. I am going to show you in
a moment a really easy way of very quickly narrowing
down the culprit. However, just quickly, just
let me say that the usual way that you're advised to
narrow down the problem is, well deactivate all your plugins, then activate each plugin
back again, one by one, check your site every time
after you've activated each one to see if your issue has come back, and that is really time-consuming. And well, it's a total
pain in the you know what. If you can't access
your admin panel at all, then, well, you usually
would have to access your server via FTP and
rename your Plugins folder and, well, all kinds of messing about. So what we have instead is
a fantastic little plugin called Plugin Detective. Plugin Detective is
very, very clever indeed. It uses a system of gradual deduction and process of elimination that I'm not smart enough to understand, but it very quickly narrows down the plugin causing the problem, and it is super friendly
and easy to use as well. It works even if you have
a white screen of death on the front end of your site, and even if you can't access your WordPress admin panel at all. It is amazing. Now it is definitely best if you already have it
installed on your site before you have a problem. It's a great idea to just
instal in your site now. But even if yo don't have it installed at the time that you have an update issue, you can still instal it at that point. If you can access your
WordPress admin area, then just instal Plugin
Detective and activate it there as you would any other
plugin, and then run it. But if you can't even access the WordPress admin area at all, you can still instal and use it, yep. Now I'm not going to go
into all the details here, but there are instructions
on the Plugins page here for how to do that. The link to the plugin
is below this video. Okay, let's see how to use it. To simulate a problem with a plugin, I've purposefully broken a line of code in the Elementor plugin. So, imagine you've updated the
Elementor plugin on the site, and now oops. Now we can't even access the admin panel to use Plugin Detective. If we could at least
access the admin panel, we could just run Plugin Detective there, but we can't even access
the admin area here at all. But it's all good because
for these situations, Plugin Detective gives us a
special URL that we can use. That's here on their plugin page. So I'm just going to copy that and the pop that into my browser. Note that we'll have to replace this bit that says yoursite.com
with our own domain name. I'll copy that to the clipboard. Let's come back across to our error page. So it's this bit that's
going to have to stay. It's going to replace yoursite.com. Lets get rid of all of this here. Let's delete that, and I'll
paste in Plugin Detective's URL. Remember again we only need
to use this special URL because we can't access our
site's admin panel at all. If we could, we could just run
Plugin Detective from there. I'm going to get rid of
yoursite.com and that space. This is now the URL. I'll hit Return on my keyboard, and I've been prompted for our WordPress username and password. It's just your standard login password. And log in. And now we have friendly
Detective Otto Bot on the case, which is great. So just click the buttons
to open a new case and get started. It says here's your site. Then you navigate to where
you're seeing the problem. Let me know when you're there. Of course, this is the page
where seeing the problem, because we can't access the site at all. So I'll click, I'm There. Now we're being asked for key witnesses, which basically means which
plugins are absolutely required for this site to work correctly, and you want to tick as
few of these as possible. Because in real life, all
of these plugins could be potential culprits. Of course in this case, we know I've actually
broken Elementor on purpose. But in real life, that
wouldn't be the case, but I'm going to leave
all of them unchecked. I'm done. So now Plugin Detective is going
to interrogate 15 suspects. That means that all 15 plugins
that we have installed. So click Start Interrogation. And what is essentially
done here in the background is just deactivated all the plugins, and it's showing us our site. But of course understand
that this is actually the homepage content, just
without Elementor's design. So as far as we can see
here, yes, it's fixed, meaning we're not seeing
the error message anymore. So yeah, it's fixed. Now it's going to interrogate
roughly half the suspects to try and narrow it down really quickly, and the remaining eight are
currently in the holding cell. Let's start interrogation. Here's your site again. Is the problem fixed? Well, as far as that we're
not seeing the error message, yeah, it's fixed. So when it interrogated roughly half of the suspects just now and the site was fine, Plugin Detective was able to clear all of those seven suspects in one sweep. So, it's time to split them up again. So now it's interrogating
four of the suspects. So start interrogation. Ah, okay, back to our problem. So, here's your site again,
is the problem fixed? Nope, it's broken. Now it's interrogating another four. Start interrogation. Is the problem fixed? Yeah, it's fixed. So, now it super quickly
narrowed it right down to Code Snippets or Elementor. Start interrogation. And now it's broken. Start the interrogation again, and yeah, it's fixed. So now, super quickly, Plugin
Detective has narrowed it right down to one suspect, Elementor. Start the interrogation. And yeah, it's broken. Culprit found.
(playful music) You'll agree, that is so much
quicker than deactivating all of the plugins manually, and then manually activating
them again one by one. Elementor is surprisingly tall actually, nearly six foot five. (drum beats) Okay, so, how would you like
to deal with this culprit? You can deactivate it here or you can leave it activated and sort out the problem on your own. Now with it activated, of course we can't even access
our control panel at all, so we'll have it deactivated, please. Okay. So now click Return to
WordPress Dashboard. Excellent, so now we can
log in, come to Plugins, and all our plugins are
now activated back again, apart from Elementor. So we know that Elementor
has got a problem. So off screen now, I'm actually
just going to go back in, fix the code in the Elementor plugin that I broke on purpose. All right, I fixed that code. Let's activate Elementor
again, fingers crossed, and there we go. Our site is back up and running. Let's have a look at the home page. Excellent. Now do know also that if you
have a problem with an update and you can still access
the WordPress admin panel, there are a couple of ways that you can run Plugin Detective. One of them is just to
navigate to the page where you're seeing the
issue and click Troubleshoot. That will jump you straight into the Plugin Detective interrogator. Or, if we come back into the dashboard, you can either come into the Plugins menu and hit Troubleshoot Plugin Conflicts. Or third option still, we come to Tools and then Plugin Detective. So that is how to really quickly narrow down a rogue plugin
causing problems on your site. We'll look at how to fix problems next. But before that, you
might also, in some cases, suspect that your theme is the problem, or at least you just want
to rule the theme out in your process of elimination. One way to know for sure if your problem is caused by your theme is just temporarily activate the most recent default
WordPress theme instead, and you do that in Appearance and Themes. And basically, if you
switch the activated theme and your problem goes away, well, you know that it's a problem with your usual theme somewhere. On the other hand, if you switch and the
problem is still there, then you know it can't
be an issue an issue with your usual theme. One of the tip for
narrowing down problems, especially if you have
a white screen of death is put to your site in debug mode. Now this is a bit more advanced, and you will need to know
how to access your server, either via FTP or via your
hosting's file manager feature, which is part of cPanel
if your host uses cPanel. I'll give you an overview of how to enable debug mode in a moment. When in debug mode, WordPress will display error messages on the page in the browser to try to at least give you a clue as to what's causing the problem. Now, honestly, these error messages are often gobbledygook and
they don't make a lot of sense, but they do sometimes at
least give you some clue as to the culprit. For example, once you've
turned debug mode on, I'll explain how to do that in a moment, the error message in your browser might mention a plugin by name. So you can see here in this example that the plugin is my-test-plugin, or it might be an error
about running out of memory. So here's an example. It says fatal error, that sounds alarming, allowed memory size of, however many bytes that is, exhausted. That just means there's
a process on your site that's trying to use a
certain amount of memory, and there just isn't enough available. More on memory issues in a moment when we look at fixing the
problems that you found. Here's how to turn debug mode on. First, log in to your server via FTP if you know how to do that. You will have to check your
own hosting's documentation on accessing your server with FTP. Or, if you're with a host that has cPanel, then you can use the File
Manager option in cPanel. But however you do it,
once you're in your server, you would edit a file in
there called wp-config.php. That is just a file that's in the root of your WordPress site. You find this particular
line, define wp_debug false. All you need is change
the word false to true. Save that file and then reload your white screen of
death page on your site, and that will then show
you the error message. And then hopefully, fingers crossed, once you fixed the error, you would edit the wp-config file again, and switch the word true
back to the word false, and save the file. If you leave debug mode
on when you don't need it, it can be a security risk, because it gives naughty people out there clues as to the file paths on your server. And you don't want to be helping
these people out, do you? So those are the ways to diagnose what's causing the problem. And once you know, how do you fix it? Well, it's really hard, if not impossible, for me to give you absolutely
concrete advice here, because, well, the range
of potential problems that you might be experiencing
is pretty endless, but there are some common
sense basics to try to at least get you moving again. One obvious thing to do is just deactivate the offending plugin, at least that way you just
take it out of the equation so it can't cause problems. It might that you don't
need the plugin anyway. But if you do, well, you might need to
contact the plugin developer and ask for help, either their support help desk or log a support ticket
on their plugin page in the WordPress plugin repository. In any case, they'll
hopefully glad of the tip-off so they can fix the problem for others. Also, check the plugin's
change log for clues. It's just a list of
all the recent changes. There might be something in
there that gives you a clue as to what changed in the latest version. Do bear in mind that the plugin that seems to be the centre of the problem might not actually be causing the problem. I know, mind blowing, right? Let me explain. For example, let's say
you update Elementor, and now a particular feature doesn't work. There is a possibility it might not actually
be Elementor's fault, but instead a problem with a
third party Elementor add-on. So if that add-on, if they
haven't updated their code to be compatible with the latest changes in Elementor itself, well, then the problem
might manifest itself while you're using Elementor even though it's not Elementor's fault. Now I've just mentioned this because I've had that at least one before. I mentioned earlier that
a quick emergency fix is just to roll your entire
site back to a recent backup, and that is a bit all or nothing. You can actually rollback
individual plugins, individual themes, or
even WordPress itself without rolling the entire site back. So if a plugin update or
a theme update for example causes an issue, and you need to roll
back to previous version, you can find the plugin's
page or the theme's page in the WordPress repository. You just click Advanced View on the right and then scroll to the bottom of the page. And you'll see an option there to download previous versions. And then once you've
downloaded the zip file for the previous version, you upload it in Plugins, Add New, or if it's a theme, you do
that in Appearance, Themes, and Add new in there, and activate it. But actually, easier than that, just instal another
plugin called WP Rollback. WP Rollback does exactly the same thing as the manually finding and
uploading the previous version like I've just mentioned, except it just gives you a nice interface to do so right there in WordPress, and you can instal this plugin after you've experienced the problem. It doesn't have to have
been installed already. Here comes another safety announcement. Please be very careful when rolling back individual plugins or your
theme to a previous version. Sometimes during an
update, a plugin or theme might add new things to
the WordPress database. And then when you instal
the old version again, you roll back, well, it gets confused and messes things up and
breaks things further. It's not always the case. I've rolled back to previous versions of individual plugins before just fine. But please, please, please make sure you have a
manual backup ready to go whenever rolling back anything, be it WordPress, your theme,
or individual plugins. WP Rollback handles reverting back to previous versions of themes or plugins, but you can also easily rollback to previous versions of WordPress itself, the WordPress Core, with
this plugin, WP Downgrade. And again, the exact same warning about having a recent solid backup applies. You have been warned. If you need to rollback to a previous version of Elementor itself, Elementor actually provides
a way to do that directly. That is under Elementor, and Tools, and then Version Control. And Finally, if you get
the out of memory error that I mentioned earlier, you'll need to increase
the amount of memory allocated to PHP for your site. There are various methods for doing this, and how you actually do it does depend a bit on your
host and their setup. It's best to just check your
host support documentation. There is a great article
all about it here. And I'll link to it below this video. One list thing that I
haven't mentioned so far, one possible error is that you perform a plugin update for example, and then this maintenance message sticks around on your site
and outstays its welcome. If you've not seen this before, this is when your site has this message. Briefly unavailable for
schedule maintenance. Check back in a minute. Well, this is a message a
visitor see briefly anyway during an update. Now it is so brief you
probably don't even notice. Now what causes this message to say that. Well, it's because an update doesn't complete for some reason. Maybe there was a server timeout because you're updating way
too many things all at once. If you have a lot of updates ready, like months and months' worth. It's actually best to
update just a few at a time, so that you're not going to
run into server timeout issues. Sometimes you might accidentally
close the browser tab while the updates are in progress. I've done that loads of times by accident. To fix this, you have to
remove a file from your server. WordPress temporarily creates
a file called .maintenance, and that is in the root
of your WordPress site on the server. It usually gets removed automatically as soon as the update is done. But in situations like this,
you have to delete it yourself. Again, for speed here, I'm just going to link below to an article which walks you through the step. If you need any help with
this, drop me a comment below and I will try to help you out. Now if in the very, very rare chance removing the maintenance file
still doesn't fix things, it might be that the update
really did stop midstream and you need to recover your site. As I say, this is very, very rare. But in that case, well, it's best to then just recover the site
from a recent back up. That's either via your
hosting control panel or via your backup plugin. An update going wrong can feel a bit scary an cause some panic and stress. Although problems like this
are far less likely to happen, you just keep on top of
updates on a weekly basis. Usually though, it's
a relatively easy fix. So, pause, take a deep breath and work through the
steps that I've showed you in this video. Whatever the problem, it is
never a complete disaster, especially if you have backups. And you do have backups, don't you? So, over to you. Drop be a comment below to let me know if you have ever had any
WordPress update horror stories. Is there anything from this video that will help you if it
happens in the future? I'd love to know. Drop me a comment. If you found this video helpful, hit the Subscribe button below and also hit the little notification bell so you don't miss more videos from me to help you build websites more quickly and more profitably with
WordPress and Elementor. And while you're at it, a thumbs on this video
will be appreciated too. I'll catch you soon.