Title: Need advice about functions.php
Last modified: November 2, 2024

---

# Need advice about functions.php

 *  Resolved [monalisa1991](https://wordpress.org/support/users/monalisa1991/)
 * (@monalisa1991)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/need-advice-about-functions-php/)
 * so I added a piece of code to functions.php due to a functionality that I want
   to include in the website using WP file manager. The entire website crashed immediately
   after I saved the code and another team who’s responsible for restoring the backup
   had to come in and save the day. 
   I don’t want to repeat this mistake. In the
   past I have added code to the php several times but never such a thing happened.
   So what should I do to prevent it and be able to add code without disturbing 
   the website. Is there a way to test the code without actually saving it in wp
   file manager?Also what could have gone wrong with the code I added that the entire
   website crashed? Any insight will be highly appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fneed-advice-about-functions-php%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/need-advice-about-functions-php/#post-18110596)
 * My recommendation would be to test the code you want to insert in a test system
   first. This can also be a staging system, for example, i.e. a copy of the live
   website. Your host can provide you with this if necessary.
 * It is also helpful to test code in a programming IDE (Visual Code, phpstorm).
   Or at least in an editor that points out syntax errors (Notepad++ with appropriate
   add-ons). A forgotten comma or bracket can lead to what you have experienced.
   Such an editor will visually point this out to you. I think there is also something
   like this available online in the browser.
 * If you show the code you have inserted, they might be able to tell you what is
   wrong with it.
 *  Thread Starter [monalisa1991](https://wordpress.org/support/users/monalisa1991/)
 * (@monalisa1991)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/need-advice-about-functions-php/#post-18112178)
 * [@threadi](https://wordpress.org/support/users/threadi/)
 * thank you so much for replying..That was great help… 🙂

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

The topic ‘Need advice about functions.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [monalisa1991](https://wordpress.org/support/users/monalisa1991/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/need-advice-about-functions-php/#post-18112178)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
