How to Solve Syntax Error in WordPress
While working on WordPress, syntax error always makes an experience. It can be very frustrating, especially if you are in your work mode. This simple error halts the entire website, which can be worrisome if you’re not experienced enough to handle these kinds of errors.
If you’re looking for ways to fix this error, then keep on reading.
Use proper syntax to avoid errors
This error arrives frequently when a beginner copies a code from somewhere and pastes it directly onto WordPress templates. Extra brackets, a semicolon missing, are all tiny mistakes in the code syntax which can cause critical errors.
If you have done the same, or have updated a plugin, then check for all the syntax mistakes evident in your code.
Fix the syntax error using FTP
It is difficult to have access to your website once this error shows up. You have to do some editing by removing or fixing the code’s syntax. Follow the instructions below to edit the code:
1. Using FTP access the file you previously edited
2. Install the FTP program
3. Connect it to your website
4. Go to the theme file which needs to be edited
5. Remove the code you have last written Or Re-write the code in correct syntax
6. Save the file
7. Upload the file back to the server
8. Visit the WordPress website
9. Refresh the page
Note: If you don’t know which file requires editing, then read the error. It will tell you the exact faulty line present on exact file.
These instructions will cause the error to disappear. All you need to do is follow the correct syntax rules while writing the code. If you are copying the code from another website, then make sure the code you paste is syntax error free. We hope that this article caused the error to resolve.
Preview may take a few seconds to load.
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Bold **double asterisks**
Three back ticks and then enter your code blocks here.
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
> type a greater than sign and start typing your quote.
You can add links by adding text inside of  and the link inside of (), like so:
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of , and the image URL inside of (), like so:
To add a divider you can add three dashes or three asterisks:
--- or ***