Title: Overwrote functions.php from Theme
Last modified: September 1, 2016

---

# Overwrote functions.php from Theme

 *  [tanmtl](https://wordpress.org/support/users/tanmtl/)
 * (@tanmtl)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/)
 * Hi,
 * I was making changes to my main functions.php file and accidently uploaded it
   to the theme rather than to the main folder. So I overwrote the one I had for
   my theme, for which I do not have a backup and which has been modified considerably
   from the original theme file.
 * Is there any other way I could find it? I cannot find it in the trash of my fta
   access. I can still see a cached version of the page which looks fine. Is there
   any way to do it from that?
 * The page is [http://www.rilab.cl](http://www.rilab.cl). I have put some code 
   from the original theme now so it at least shows up but many functions are no
   longer working.

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

 *  [MarkRH](https://wordpress.org/support/users/markrh/)
 * (@markrh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692573)
 * I am guessing you don’t have a local copy of your site where you edit the files
   and then upload?
 * Check with your webhost and see if they do daily backups and, if so, see if they
   can restore the file from a couple days ago.
 *  Thread Starter [tanmtl](https://wordpress.org/support/users/tanmtl/)
 * (@tanmtl)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692576)
 * Of course I don’t, that would be too smart!
 * I usually do but it was just a quick easy edit and so I figured I wouldn’t need
   it.
 * Good suggestion, I will contact them!
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692619)
 * Or you could download the theme again and extract the functions.php file from
   the zip and use that. Or is that the one you modified? You overwrote the default
   theme functions.php file with your custom file? I’m confused about which file
   is which.
 *  Thread Starter [tanmtl](https://wordpress.org/support/users/tanmtl/)
 * (@tanmtl)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692621)
 * Unfortunately, that won’t work. As I said, I had modified my functions file with
   some snippets from other developers to do specific things, for example put a 
   footer and create category grids. I have now put the original theme code so at
   least something shows up, but I really need a solution that will restore my old
   file. I am also taking suggestions as to how to better do this in the future.
   Like maybe I should modify a secondary functions file?
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692626)
 * Are you using a child theme? That’s where your custom functions should go.

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

The topic ‘Overwrote functions.php from Theme’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/overwrote-functionsphp-from-theme/#post-7692626)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
