Thursday, 02 January 2014 11:21

Fixing the Syntax Error in Wordpress

Written by 
Rate this item
(0 votes)
If you were trying something new on your Wordpress site and got a following error “Syntax error, unexpected…�, its simple to solve using Proper Syntax to Avoid Errors

First thing we 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? Check out our guide on locked out of WordPress admin. The only way to fix this is to access the file you last edited using FTP (How to use 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.

A simple tip from
Read 3181 times Last modified on Thursday, 02 January 2014 12:26

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.