Parse error: syntax error, unexpected …
“Parse error: syntax error, unexpected …” in WordPress: causes and what to check
# Common log entries
PHP Parse error: syntax error, unexpected token "}" in …/wp-content/themes/…/functions.php on line …
PHP stops before running any code when a file contains a syntax error. The message names the file and the line; the site shows a white screen, this error, or the critical error message.
Which of these matches what you see?
A missing semicolon, quote, or bracket in the edited file stops PHP. The line number in the message points at the mistake or the line just after it.
The update was interrupted and left a partial file, or the new version uses syntax the server’s PHP version does not accept.
The error is in that plugin’s file. Renaming the plugin folder over FTP stops WordPress from loading it.
Common causes
References
- Debugging in WordPress (Advanced Administration Handbook)
- Common WordPress errors (Advanced Administration Handbook)
What the system does
White screens and fatal errors (plugin conflicts, PHP version incompatibility) are handled automatically: on a copy of your site in the recovery station, the system turns on debug mode, finds the plugin or theme causing the error and deactivates it (not deleted). Deactivated plugins are listed in the recovery report; whether to re-enable them is your decision. Fixes are made on a copy of your site in the recovery station and written back only after re-verification passes. In your site’s database, the protected tables (members, comments, orders and form submissions) are copied as structure only. In SSH and FTP mode, the system creates a pre-recovery backup on your host before writing back and restores from it if verification after write-back fails. If the recovery cannot be completed, the recovery fee is refunded in full.
- Initial assessment: Enter the site URL
- Copy to the recovery station: Work runs on the copy
- Find the cause: Item-by-item checks
- Recover and re-check: Home and inner pages
- Write back or deliver: Only after re-checks pass
Use WP119 when the dashboard does not load and you prefer not to edit plugin or theme files on the server.
Assess my site →