Parse error - syntax error

WordPress is mainly written in  PHP. The syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language. 

Syntax error happens when your code is structured wrongly, such as a missing colon at the end of a sentence or a missing PHP opening tag.

It normally happens when you are editing a theme file or pasting custom code obtained from the internet. You will not be able to login to your WordPress dashboard to make any changes. 

Solution

You will have to carry out the following steps to rectify this situation.

  1. Download a fresh copy of Customizr Pro Theme from your account. If you are using the free version of the theme, download a new version from here.
  2. After login, click on the View Details and Downloads link.

  3. You will be taken to a page that shows your purchase details, scroll to the end of the page and you will see customizr-pro download link. Click on it to download. Save a copy of customizr-pro.zip on your computer.

  4. Use your FTP program to log into your web hosting server.
  5. Navigate to the file on your web hosting that's containing the error. In this example we will assume that the error is in functions.php
  6. Download a copy of functions.php as a backup, so as to keep your previous customization.
  7. After backing up the file, proceed to delete it.
  8. Unzip the copy of customizr-pro.zip that you have downloaded from your account, and upload a fresh copy of functions.php back to the same folder on your web server.
  9. Clear your browser cache and re-visit your website.

External Resources

  1. Syntax Programming Languages
  2. PHP Parse/Syntax Errors; and How to solve them?
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.