WordPress – Syntax Error

There is such an abundance of WordPress tutorials, guides, and code snippets available on the web. They are all intended for users to try new things on their website and learn more about WordPress. Sadly a small little error can cause the whole site to break which is very scary especially for new users. If you were trying something new on your WordPress site and got a following error “Syntax error, unexpected…”, then don’t freak out. You are not the first one to receive the syntax error in WordPress, and you will not be the last one. In this article we will show you how to fix the unexpected syntax error in WordPress.

Using Proper Syntax to Avoid Errors

First thing you need to do is to look at the beginner’s guide to pasting snippets from the web into WordPress. This article lists some very common mistakes made by beginners when pasting code in WordPress templates. The syntax error is usually caused by a tiny but crucial mistake in your code syntax. A missing comma, or an extra curly bracket can break the entire script.

Did you recently paste a snippet from the web? Updated a plugin? Then chances are you know exactly where to look.

Fixing the Syntax Error Using FTP

In order to fix the Syntax Error you need to edit the code that caused this error. You can either remove it or fix the syntax. Often beginners freak out because this error causes your entire site to become inaccessible. If you pasted the code using your WordPress dashboard Appearance » Editor section, then you are locked out. So how do you edit the code? The only way to fix this is to access the file you last edited using FTP.

After installing the FTP program, connect it to your website and go to the theme file that needs editing. In case you forgot which file you need to edit, just look at the error code. The error will tell you exactly which file and which line you need to edit.

You can either remove the code you last added or write the code in correct syntax. Once you are done removing / editing the code, save the file and upload it back to your server. Come to your WordPress site and refresh the page, and your site will be working.

We hope this article helped you fix Syntax Error in WordPress. Please leave your questions and feedback in the comments.

Looking for quality WordPress Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , | Posted under WordPress | RSS 2.0

Author Spotlight

TJ Marsh

TJ Marsh

My name is Tj Marsh. I spend about 16 hours a day on the internet. Running my company and helping out here at Arvixe. I live in the good ole Arizona where it gets ridiculously hot. I love WordPress and a lot of other open source software along with coding.

Leave a Reply

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


6 × 2 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>