Syntax Error in Code
There's a mistake in the PHP code of a file (plugin, theme, or functions.php). This usually happens when a file was manually edited and a bracket or semicolon was missed.
Why this happens
PHP is a strict language - a missing semicolon, an unclosed bracket, or a stray character anywhere in a file will stop the entire script from running. This almost always happens right after a file was manually edited, whether by you, a developer, or a plugin's automatic update process being interrupted partway through.
Step-by-step fix
- The error message will show the exact file name and line number (e.g. functions.php on line 42).
- Open that file in File Manager and check around that line number.
- If you recently edited something yourself, undo or remove that change.
- If it's a theme's functions.php, restore a working copy from a backup.
- Edit the file via FTP/File Manager rather than WordPress's built-in editor until the issue is fixed.
How to prevent it happening again
- Avoid editing PHP files directly through the WordPress admin's built-in file editor - use FTP or File Manager instead, which is easier to recover from if something breaks.
- Always keep a backup copy of a file before manually editing it.
- Use a code editor with syntax highlighting, which visually flags unmatched brackets and quotes before you save.
😩 Still stuck, or want it fixed without doing it yourself?
I fix WordPress errors like this every day. Send me your error and I'll get your site back up - most fixes are completed within 24 hours.