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.
Table of Contents
Steps to Use Safe Mode:
- 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
- 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. - 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