How to Fix a Critical Error in WordPress
Aug 16, 2023
How to Fix a Critical Error in WordPress
Critical errors in WordPress can occur if you are adding/modifying custom code in the backend and before you know it, “There has been a critical error on your website” is thrown right at you. This is an easy fix if you have access to your server, in most shared hosting cases this is what we call cPanel. Sometimes you don’t have access like that, but only via FTP. As long as you have access to your WP files in any way, you’re set. Newer versions of WordPress also started to issue an email to your admin account. If you have that set up properly then you may expect an email from WordPress with a link to trigger recovery mode and enable you to login to your backend and see what was causing the issue. TABLE OF CONTENTS 00:00 Intro 00:50 How does critical error occur in WordPress 01:50 How to regain the access to your admin interface 04:35 Entering recovery mode via email MUSIC Danger Storm by Kevin MacLeod Link: https://incompetech.filmmusic.io/song … License: https://filmmusic.io/standard-license
Content
0.08 -> there's a lot of people that build websites
in wordpress however not a lot of them are
5.76 -> proficient with writing code or interpreting code
seeing the mistakes in code and stuff like that
12.24 -> but sometimes sometimes you need to resort to a
solution that's only available with code so you
17.84 -> go in there stack overflow wordpress
community whatever you pay some code
22.16 -> from a forum or elsewhere and it doesn't work
there's an error some things is just not right
28.32 -> on your website and you get a critical error you
cannot log back into wordpress so what do we do
40.4 -> hi my name is mr gecko and i'm helping you
create better websites this channel is all
44.96 -> about wordpress gutenberg and the whole design
process behind it so if you're into that consider
50.32 -> subscribing so here we are on one of my tests
websites so let's say i have this acf taxonomy
58.24 -> shortcode this is my custom plugin and it has a
syntax error so somehow it got true and when i
67.12 -> reload this page i get the critical error and when
this happens uh actually in the recent versions of
74.96 -> wordpress wordpress will if you entered the email
and everything correctly is admin email it will
80.8 -> email you back and give you a link to actually
disable your plugins or whatever cause the issue
89.76 -> uh enabling debug mode or something like that
uh to let you fix the error without going to the
96.08 -> back end but here this this thing here whatever
happened is now a critical error please check
104.24 -> your site admin email inbox for instructions
so now i can't even log back into the back end
111.04 -> and i need to go back to my cpanel like you need a
server access where your wordpress installation is
117.6 -> located uh this is cpanel maybe you're using plask
or some other uh backend manager or you're using
127.04 -> ftp connection or so either way you have to access
somehow uh your uh your backend and access what's
140.24 -> causing the problem so i know that uh my plugins
have caused the error but you may not know
146.88 -> what caused the error so you may you may rename
the whole plugin directory to plugins one uh
154.8 -> let's say like that and let's check back in here
you see now now it works but i've i've broken it
162.32 -> because there's no plugins now uh let me go back
inside my dashboard uh let me go to the plugins
169.36 -> and you see now now all the plugins give me error
and there's no plugins currently available so
178.24 -> uh but the the theme is looking awkward because
i'm using cadence team and cadence team needs
183.92 -> needs needs some plugins to function so not
right now i disabled everything so when you don't
189.84 -> know what's causing the issue so just disable
everything and when you want to disable everything
196.56 -> as as you see just rename or rename the plugin
in question because for example here i know
202.4 -> that the plugin in question was acf so you
can just rename acf to something like acf1
208.56 -> and uh yeah you will return to the previous
state but now since i uh renamed to plugins one i
217.12 -> actually uh i actually deactivated what
happened is i deactivated all of them so
225.6 -> then you can activate one by one
and see what's causing the issue
229.36 -> sometimes also you may have an issue where you
want to edit your functions php file in your child
236.96 -> theme or your theme but you should always use
child theme of course i have one of those videos
243.44 -> up there in the cards if you want to check while
you should use child theme but in child theme you
248.72 -> have this function php file so you may have
code here that's breaking the site as well
254.4 -> so renaming this functions php file to
functions php one just rename it you know
260.64 -> that wordpress doesn't recognize it's that
functions php file and it will render it to
266 -> you know not usable and it will just exclude uh
that file from using and then you will have your
272.64 -> site back so that's basically what's happening
here and there's actually one more way to fix uh
277.84 -> this even without having access to
your server back-end like cpanel or
284.88 -> ftp and things like that so what happens is when
critical errors occur in your wordpress website
291.92 -> the website itself will automatically issue an
email to your admin account your admin email
299.6 -> and you will get a recovery link same like you you
get a link when you forget password so you click
307.36 -> that link you log back into the back end it enters
recovery mode and you can fix things yourself so
314 -> if you like content like this hit that
thumbs up button i know this video is
318 -> very simple and easy and quick uh but sometimes
i feature code and critical errors may occur
324.64 -> uh to your wordpress if you copy paste some
stuff that i give you so this is just a quick
330.56 -> disclaimer how to fix if these things secure so
uh i hope you're doing well and uh thanks for
339.12 -> watching my content and supporting
me so yeah see you in the next one
Source: https://www.youtube.com/watch?v=NEFg6sEK3h0