How To Fix Syntax Error In Your WordPress Site

In many times you have met WordPress Syntax Error.Mostly It will show during unexpected situation. Oooops! What should you do in this problem.Don’t worry most probably it will simply error to fix.We will see common causes and how to troubleshoot them and running quickly.


WHY Syntax Error It Always Says? 

Normally syntax errors are coming from your code.It will error like character mistake or a tag in the wrong place or it’s missing altogether. Sometime it will be a very small one. But we can’t miss them because it will effect to huge problem in code.

A webpage is a set of codes,plugins,themes and tutorials,images videos.. There are different different features in there. At the end of the site you can see a huge code. And probably it will complex. Ooops ! What should you do in this situation. Do you know? A simple syntax error is enough to bring your site down.So You should careful about your mistakes.


HOW Find Out The Solutions?

syntax error

01)Fixing the Syntax Error Using FTP
02)Using Debugging Tools
03)Troubleshooting the Error
04)Using JS Bi
05)Using JS Fiddle

06)Cloud 9
07)Debug Mode
08)Troubleshooting Using Plugins


01)Fixing the Syntax Error Using FTP


In this situation you its unable to visit your site. So you should go though different ways. Then you can use an FTP app to access to your website’s files and make it’s any modifications that you want to do. There are lots of FTP Programs are available. Filezilla is good way to make you success. It works on different different platform. And also it’s free under the GNU license. Someone can see FTP in their cPanel. If it has a different ,When the are working they use to same method to access.

Just you login to your server by using your FTP app, Then after you should navigate your folder and find the file that has the error.
As the first step. You have to download the file.You can see it from following image.

You can use this part to find your file. Go to wp-content>>themes>>name of the theme>>name of the file.

After that select and download file. Then open it to to do your modifications.When you are finished it save and upload the file.After you uploaded the file.It should nicely working without an error.

02)Troubleshooting the Error

This type errors are common in WordPress site. When you are working with your site, You will or you already had seen this type of errors. These errors are usually caused by missing commas ,Inserting Curly brackets in wrong places or when it will put in wrong side, or even placing the code within a wrong file.In this situation.
Now I’ll explain above by using a simple example.

Here’s an example for syntax error. Can get a little idea about that. Think, if you haven’t any idea to solve that problem. Then you can copy and paste the code into an IDE (interactive Development Environment) or Code Editor. It is sure you can fix error very simply. Just after you fixed it then you can save it and run. See how simple to use  this tools.

03)Debugging Tools

This is wonderful Tool also. Because it is very simple to find out errors. If you are not sure what is the error then you can quickly use this tool. As a example when you had missing a bracket you can find out easily. Because some tools are highlight that phrase. Now you can see the result. There are so many debugging tool available.

4)JS Bin

JS Bin is helps to debug HTML , CSS and JavaScript. and you can run all these. Also can get idea about how to interact with them what are the performance of these. You can see that how it works, After you typed code and run it. There are different options for each language in drop-down menu. You can select any…

5)JS Fiddle

You can use this to HTML, JavaScript, CSS. And also you can use it in another languages too. It has a tool to help clean up your code.
Not  only that you can save and collaborate your code with other. This is a plus point to team work. Specially this made for developers who wants to add a JavaScript examples in their sites. This plugin simplifies the process.
Every developer has been situation where you have code or a design that you need to test quickly and possibly share with others.I think so this is one of best,perfect solution.
Here’s the environment of JSFiddle. The main part is divide into 4 categories basically.They are already mention in above. This is mere description about them.

HTML:-This is use to enter HTML to be used in your test.By default ,it will appear between <body> elements on the page unless overridden by options in the left pane. Also It is directly works in CSS and Java Script in the respective areas.

CSS:-You can embedded CSS in your HTML code. It should in between <style> elements in the header part pf the page.

JavaScript :-JavaScript source is entered in this area.It should include in <script type="JavaScript"> tags in the header part of the page.

Output :- The result of executing the CSS , HTML, and JavaScript entered into the sections of the page.

6)Cloud 9

cloud 9

This is online task. Also IDE with 150 different code languages. This is a cloud fr developers to set up a testing servers quickly without any configurations.It has a build-in debugger that lets you set breakpoints,step over,step through,execute code,and even set it in any browser.At the Starting you can use it free or you can also get a pro account starting at $19 per month.If you are worry about your code, this is the best tool specially offer to you.

7)Debug Mode

There lots of debugging settings available to help you to debug the main applications,themes,your own custom code, and more.Normally these settings are using by developers and they should not be used on “live” sites. But also you can use these settings for your site.There are two categorise of installation.

     1)Local installation
     2)Live installation

1)Local installation


Now we will see how to enable debugging mode in WordPress. Easily you can follow these steps.

     1)Log in to cPanel,or access your account using SSH.
    2)Open the SSH command prompt and open the wp-config.php file in your preferred text editor by using cPanel File Manager.
     3)To enable the Debugging Mode,add the following line to the wp-config.phpfile


     define ( ‘WP_DEBUG’,true );

If you want to disable debugging mode .You can achieve your task by modifying the line in wp-config.php file as follows.

    define ( ‘WP_DEBUG’,false );

2)Live Installation

Use this code in the same place for a live site:-

// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);

After this code you have made changes to your files.


08)Troubleshooting Using Plugins

Sometimes You have to error like get a blank screen. In this situation it’s difficult to find out what is the error and where it is..So if you haveaccess to the dashboard then you can troubleshoot using plugin easily.

These are the methods of fixing syntax errors in your WordPress site… 🙂 





Leave a Reply

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