How to Fix the Syntax Error in WordPress

How to Fix the Syntax Error in WordPress


How to Fix the Syntax Error in WordPress

A common and seemingly frightening error that users can run into is the Syntax error. This error can prevent you from making any changes on your site and prevent it from even being visible but we’re here to help you resolve this issue without too much hassle.

We recommend using a FTP for this tutorial, if you do not know what a FTP program is take a look at our tutorial below:
http://www.wpbeginner.com/glossary/ftp

Text version of this tutorial:
http://www.wpbeginner.com/wp-tutorial

If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.

Check us out on Facebook:
  / wpbeginner  

Follow us on Twitter:
  / wpbeginner  

Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/

Summary of this tutorial:

With this error you will be locked out of your admin area so we would recommend using a FTP to log in to your site’s files.

Read the error it is giving you and locate the file the error is pointing to such as the wp-content themes folder and open the file that is causing the error.

If it is code that you have added you will want to remove the new code, save the file and then reupload it.

That should allow you to log back in to your WordPress website.


Content

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

Source: https://www.youtube.com/watch?v=1k02kSS6U7M