Support » Plugin: Code Snippets » Help! I just activated a snippet and my site broke!

  • Plugin Author Shea Bunge

    (@bungeshea)


    Oh no! You’ve just activated or edited a snippet, and some error in the code has made your whole site come crashing down into a white screen of death. And the worst of it is, you can’t access your admin panel to deactivate the offending snippet.

    If this has happened to you, the first step is to enable ‘safe mode’. When safe mode is enabled, none of the snippets will execute their code, allowing you to access your site and deactivate the snippet that is causing the error.

    To activate safe mode, add the following line to your wp-config.php file, somewhere before the line that reads “/* That’s all, stop editing! Happy blogging. */“:

    define('CODE_SNIPPETS_SAFE_MODE', true);

    After enabling safe mode, you should be able to log in to your WordPress dashboard and deactivate or fix the snippet that was causing the issue.

    Once this is done, you can to turn safe mode off by either commenting out this line or deleting it.

    A more convenient way to enable sage mode on a per-page basis is by appending ?snippets-safe-mode=true to the URL of the current page.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help! I just activated a snippet and my site broke!’ is closed to new replies.