How to Fix a Website Broken by the WP Code Snippets Plugin

summertime flag C1GL tVioc unsplash scaled Plugins
This article can be read in about 3 minutes.

If your website breaks due to an action such as adding incorrect PHP code in the WP Code Snippets plugin and activating it, you can use the Safe Mode feature to resolve the issue. By enabling snippet safe mode, you can access your site and deactivate the problematic code snippet.

Steps to Use Safe Mode:

  1. Add the “wpcode-safe-mode” Parameter to the Admin URL
    If your site’s admin URL is as follows:
    https://example.com/wp-admin
    Add the parameter ?wpcode-safe-mode=1 to the URL, like this:
    https://example.com/wp-admin/?wpcode-safe-mode=1
  2. Access Safe Mode
    After navigating to the Safe Mode URL, go to the list of snippets. Locate the problematic snippet and deactivate it.
    This should resolve the issue and restore your site.
  3. Keep Safe Mode Activated if Needed
    Safe Mode remains active until you click the link in the notification to disable it.

Important Notes:

  • User Permissions: Only users with permissions to activate or deactivate snippets can use Safe Mode.
  • Login Required: You must log in to enable Safe Mode.
    If you are logged out and unable to access your site, you can still use the Safe Mode parameter on the login page. However, the parameter will not work on other pages unless you are logged in.

By following these steps, you can fix your site while avoiding further complications.

Comment

Donate with Cryptocurrency!

Copied title and URL