WordPress Syntax Error

Andrei Iordache

Andrei Iordache

WordPress Developer

­čÜÇ I Help People Get Found Online | WordPress Development, Core Web Vitals, Security&Maintenance

WordPress Syntax Error

The syntax error is one of the most common WordPress errors of all time ( parse error syntax error unexpected ). If you are seeing a WordPress syntax error on your website it is more than likely caused by changes you recently made to your WordPress installation or perhaps a bad plugin or theme that you just installed. 

How to debug WordPress syntax error and find the issue?


ATTENTION: ALWAYS DO A BACKUP OF YOUR SITE BEFORE DOING ANY CHANGE.

To debug a WordPress syntax error you will need to edit your WP-CONFIG.PHP file and add the following line of code:

define('WP_DEBUG', true);

Add the line at any blank space anywhere in the file. After you have added this line you should be able to refresh your website and see more details regarding your error. Adding WP_DEBUG and setting it to true basically tells WordPress to show you more technical details of why you are having trouble. Attention: You should never keep this setting enabled on a live website because it allows malicious users to gain more information about potential issues with your website.

If you are still having issues you may need to contact the support team of your hosting provider to see if they can help you or use the WordPress forums to see if someone may be able to help there.

How do I fix the WordPress syntax error?


The easiest way to fix this issue if you recently installed a plugin is to simply deactivate the plugin. If you lack access to the WordPress admin area you can deactivate the plugin by removing its folder under /wp-content/plugins/PLUGIN-NAME/. Always make sure to do a backup before editing files. You can use an FTP client like FileZilla to access the files to your website. If this does not solve your error continue on to the next section to see more solutions to solving this issue.

Submit Your Guest Post

Previous Post
[SOLVED] Child Theme WordPress Template is Missing
Next Post
WordPress Internal Server Error
Lusi StudiosLusi Studios
15:32 22 Jun 22
Andrei did an amazing job! He helped in a very rushed time and he excelled at everything. Thanks again!
I am grateful and I would to thank Websites Seller for their support in site recovery and site transfer. Websites Seller just saved my business. Thank you!
Wouter GhysensWouter Ghysens
11:52 10 Sep 21
Looking for a Wordpress transfer from site A to site B, I found back Andrei from Wesites Seller on Google.He was very proactive in his approach, came with hundreds of ideas and lifetime experiences from other migrations. He knows the wordpress, the hosting and php database as the back of his pocket.And we worked out this migration very smooth. Together we solved it, and myself and my business are very pleased with his approach.100% recommendation & kudo's from out of Belgium!
Ioachim CiobanuIoachim Ciobanu
18:39 14 Jul 21
Websites Seller built my resume site. Deliverables were quickly completed, and I was asked for my feedback at each stage of development. All feedback I gave was implemented in a short time.Another great thing is that he comes with smart solutions, regarding stuff which I didn't initially think of (site security, Google site speed optimization and so on). Basically, he was great, staying in touch, keeping me updated and paid attention to what was most important for my site.Overall, I am very happy with the work done. I highly recommend this developer!
K CollinsK Collins
09:11 19 May 21
I needed help with website speed - to improve my core web vitals - without compromising the usability of my site. Andrei was extremely responsive, proactive and fast. And more importantly, he increased by website speed. Highly recommend him, and I will be using him going forward on all my projects.
js_loader

Submit Your Guest Post

Services

WordPress Website Maintenance Services

WordPress Maintenance Services

WordPress website maintenance service that provides cloud backups, emergency support, weekly website updates, speed and many more.

sally

WordPress Migration Service

Safely transfer your WordPress website to a new location for $75. … Migrate your website to its new host.

lawyer-office

Lawyer Web Design

We specializes in website design, Internet marketing and SEO for lawyers and attorneys throughout the Europe and US.