• Resolved monalisa1991

    (@monalisa1991)


    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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    (@monalisa1991)

    @threadi

    thank you so much for replying..That was great help… ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.