One of the most common problems of WordPress website during editing the theme is Parse error. For your WordPress website, you may find out a nice theme and you install it perfectly. Then you tried to customize/add a simple code through the custom file editor. But you do the bad thing that you have seen ever. Your site is totally broken and become inaccessible. Just showing an error message, “Parse error: Syntax error, unexpected….”
Actually, this problem made by beginners when trying to edit/paste a code in WordPress Theme. The parse error mainly caused by a tiny mistake in the code editor area. A simple missing of comma or bracket is enough to happen this error.
You may face the problem when you try to edit your theme, update any plugin or paste any snippet using your WordPress dashboard Appearance>> Editor section. When this problem happens then you can not access both your WordPress dashboard and website. Actually, it’s a very critical problem for the new WordPress users. To solve this problem you need to use FTP (File Transfer Protocol) and it is the only way to fix the problem. Don’t worry about this problem. You are not the first one to get the parse error in WordPress site and you will be not the last one. In this article, I shall show you how to fix the parse error in WordPress website.
Now how to fix the “Parse error: Syntax error, unexpected…”
First Step (Download and Install FTP Program):
FileZilla is one of the most popular free FTP (File Transfer Protocol) Program. In this tutorial, I used FileZilla because it is simple and easy to use. Firstly Download FileZilla from the web and install it on your computer.
Second Step (Configure FileZilla and Connect To cPanal):
After installing FileZilla, you need to connect it to your website server. You need Host Name, Port, User Name and Password to login into the server/cPanal using the FTP (File Transfer Protocol) solution. You can get all these information from your hosting provider.
Third Step (Find Out The Error and Solve It):
After connecting FileZilla to your website’s server, you can see the contents of your WordPress site. To fix the parse error, you need to edit/remove the code that caused the error. Just find out the theme files that need editing. If you can not find out the files or exact location then follow the path what is saying in the code error message. It says the exact location where you need to edit.
Then download the function.php file and open it using a notepad. Now edit/remove the error code and save the file. Then again upload the file to your website’s server using the FTP. Your task is almost done. Now refresh the browser and look your website is working properly.
I hope this article has helped you to fix the parse error during editing WordPress theme. If you have any question then you can ask through the comment box below.