A syntax error means PHP found a typo in a site code file, often from code pasted into functions.php or a plugin your server's PHP can't run. Content is safe.
What it means
PHP is strict about syntax - a missing semicolon, unclosed bracket, or incompatible function call stops everything. The error message names the exact file and line.
Why it happens
It usually comes from custom code pasted into functions.php, a child theme, or a plugin - or from a plugin using PHP features your server version doesn't support.
A real example
A marketing manager copied a PHP snippet from a tutorial into functions.php to add a tracking pixel, pasted it inside the existing code instead of below it, and saved. The entire site - frontend and admin - returned a white screen with "Parse error: syntax error, unexpected" and the file path. Because the admin area was also dead, the only fix was editing the file directly via FTP or the host's file manager. One missing semicolon or bracket takes down every page at once, which is why code edits belong in staging, never live.
What to do
- Read the error - it tells you the file path and line number.
- If it's functions.php or a theme file, revert your last edit or restore from backup.
- If it's a plugin file, update or replace the plugin.
- Never paste code snippets into functions.php without testing on staging first.
Still stuck? Syntax errors are usually quick fixes once the file is identified - we can pinpoint and repair them fast.
Get emergency help