How to Fix the Syntax Error in WordPress

How to Fix the Syntax Error in WordPress


Do you need to fix the syntax error on
your WordPress website? Well keep watching because I’ll show you how to
fix the error and get your site up and running quickly. This is the same
technique several of our readers have used to get their sites back online and
by the end of the video you’ll know exactly what to do if you ever run into
a syntax error again, so if you’re ready let’s get started.
A lot of people will get this error if they’re editing their theme in the
editor area like you see or if you’ve updated a plugin. You need to know where
the issues started. For this video I’m going to break my site so that you can
see what I’m talking about as soon as I add that in you see now we have an error
on our site and we need to figure out how to fix it. Once you get the error you
can’t go back into the admin area to fix it so you have to learn how to do it a
different way and what we need to use is an FTP client. I’m going to use FileZilla
but there are several that you can use to choose from. The FTP client allows me
to access my website from my hosting account so you’ll need to know the
information from your hosting account on how to access your website with the
password and the username that they’ve provided with you.
Once you get the FTP account established and you’ve connected to your website
then you’ll want to go to the area where the problem started. If you’re not sure
where the error is located just look on your error page and it will show you the
folder and the file that the error is happening on so you can open that up in
your FTP file. So now I know I need to go into my 2016 theme my functions.php
to fix the error, scroll down to my 2016 and need to download my functions dot
PHP page locally and then I can edit it locally and then for this one I just
need to scroll all the way down to the end of the functions page to remove the
bad line of code, we’ll save that. Now we need to upload it back up to our server and
now when we go to our admin page you see that it’s available again for you. So
that’s a quick and easy way to get your site back up and running after you run
into a syntax error on your WordPress website. Did you learn something from
today’s video? If so subscribe to our YouTube channel
and we’ll send more helpful tips to help you manage your WordPress website and
thanks for watching

14 thoughts on “How to Fix the Syntax Error in WordPress

  1. This reminds me, I recently saw a plugin that automatically disables plugins that generates an error like this or other, so no need to manually change files to get your dashboard working. I thought it was a cool idea. I am not the author of the plugin. Here it is: https://codecanyon.net/item/wordpress-plugin-runtime-error-handler/20323927

  2. In the video, the syntax error mentions a different line (423) than where the bad snippet you added (line 845). How does that work? The line I am getting an error from looks fine to me (I don't know php coding, but it looks the same as other functions around it in the code). How am I supposed to find the problem if it is located somewhere totally different than the error message suggests, if it is the same as your example?

  3. I had an error on the function.php file, and loading most of the pages it gave me this error:
    ParseError thrown

    syntax error, unexpected '<', expecting end of file

    I was really frustrating on solving it, and watching your video, i solved it in just 2 mins. Now the site is running correctly again. Really thanks (Ps: you can have a look at my site, peoplelivetv.co.uk )

  4. this is exactly the error that i'm getting but what bothers me is that i'm simply adding another function then action it (WITHOUT any spelling or syntax mistakes) but I still get this error message. I've actually checked the entire page for syntax errors but came across nothing. Is there something I'm missing? or do I have to create a custom functions page to implement custom functions?

    Any relevant advise would be appreciated.

  5. This is a really useful solution – many thanks, wish I'd have known about this before as I'd have saved many hours of frustration

  6. hi i have a parse error in a plugin and i couldn't use my wordpress admin panel as well i tried to login through ftp using filezilla.. but i failed..can you help to fix it and save my job

  7. Thanks for the instructional video. But suppose I do not know what causes the error: How DO I find it? Just replace the whole functions-php-file?

Leave a Reply

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