Title: Php fatal error after editing functions.php
Last modified: August 22, 2016

---

# Php fatal error after editing functions.php

 *  [m2a179](https://wordpress.org/support/users/m2a179/)
 * (@m2a179)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-after-editing-functionsphp/)
 * I was doing some customizations, edited the child theme functions.php, and once
   I saved it.. I got a php error. I tried to paste the original code from wp-admin,
   but could not save again. Then I uploaded the original functions.php code to 
   parent and chil and still have this error:
 * Fatal error: Cannot redeclare et_setup_theme() (previously declared in /home1/
   ioanaher/public_html/ioanaherman.com/wp-content/themes/alex/functions.php:7) 
   in /home1/ioanaher/public_html/ioanaherman.com/wp-content/themes/Divi/functions.
   php on line 60
 * How can I fix this? Is there a way to roll back the latest changes from phpmyadmin?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-after-editing-functionsphp/#post-5652898)
 * you are trying to define a function ‘et_setup_theme()’ in functions.php of the
   child theme, or you maybe have copied the full code from functions.php of the
   parent theme into functions.php of the child theme.
 * remove the function ‘et_setup_theme()’ from your functions.php in the child theme,
   or start with an empty functions.php in the child theme – [http://codex.wordpress.org/Child_Themes#Using_functions.php](http://codex.wordpress.org/Child_Themes#Using_functions.php)
 * please contact the developer of the theme ‘Divi’ for support with details; [http://codex.wordpress.org/Forum_Welcome#Commercial_Products](http://codex.wordpress.org/Forum_Welcome#Commercial_Products)
 *  Thread Starter [m2a179](https://wordpress.org/support/users/m2a179/)
 * (@m2a179)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-after-editing-functionsphp/#post-5652987)
 * Yep, the problem was that I copied all the code from the theme’s functions.php
   to the child’s functions.php.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Php fatal error after editing functions.php’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [m2a179](https://wordpress.org/support/users/m2a179/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/php-fatal-error-after-editing-functionsphp/#post-5652987)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
