Guides › WordPress › Site down or error screens

WordPress Shows Fatal Error: Cannot Redeclare Function

Two pieces of code define the same function. Usually two copies of one plugin or a theme duplicating a plugin.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

What it means

PHP found the same function name defined twice.

Common reasons

Fix

  1. Read the error: it shows both files.
  2. Deactivate and delete the duplicate copy.
  3. If you added code to the theme, remove the repeated function or wrap it in a check for an existing function.
  4. Update the theme or plugin that is out of date.

Use a child theme for your own code. See WordPress Child Theme: Why You Need One and How to Create It.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.