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 article 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 article 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 twentysixteen theme.
My functions.php to fix the error, scroll down to my twentysixteen. And need to download my functions.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 backup 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.