Title: Redirect loop fail
Last modified: February 20, 2023

---

# Redirect loop fail

 *  Resolved [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/)
 * So I have, by mistake, added a PHP snippet on my frontpage that redirects to 
   my frontpage with no conditions to it.
   So now everytime I active the plugin again,
   it starts this redirecting loop. Where can i delete this Snippet so that this
   doesnt happen?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirect-loop-fail%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487734)
 * Hi [@tnichum](https://wordpress.org/support/users/tnichum/),
 * You can enable the safe mode for WPCode to prevent the snippet from running so
   that you can access your admin area and disable it. All you have to do is go 
   to your site at /wp-admin/?wpcode-safe-mode=1
 * More details can be found in this article [https://wpcode.com/docs/php-error-handling-safe-mode/](https://wpcode.com/docs/php-error-handling-safe-mode/)
 *  Thread Starter [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487758)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/) Then after going to
   that, would it be safe to activated the plugin again? Would it remember that 
   safe-mode is enabled even when switching page?
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487764)
 * Hi [@tnichum](https://wordpress.org/support/users/tnichum/),
 * You will have to first activate the plugin, once the loop starts you can just
   close that tab and navigate directly to the safe mode URL. Once you are in safe
   mode, the safe mode will be kept until you click the exit button in the notice
   at the top. Once in safe mode you can go to the WPCode screen and disable the
   faulty snippet from the list.
 *  Thread Starter [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487796)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/) 
   That doesn’t work.
   It still says the redirect loop is active.
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487803)
 * At this point the loop might be cached by your browser, I suggest trying to access
   a different page with the safe mode parameter appended to it, for example:
 * /wp-admin/admin.php?page=wpcode&wpcode-safe-mode=1
 *  Thread Starter [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487821)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/) 
   That worked for me.
   But the snippet is no longer visible there. I have deleted an entry in the database
   under the table called www_posts that had the faulty line of code in it. Could
   be this is why it is not showing up?
    -  This reply was modified 3 years, 3 months ago by [tnichum](https://wordpress.org/support/users/tnichum/).
 *  Plugin Author [Mircea Sandu](https://wordpress.org/support/users/gripgrip/)
 * (@gripgrip)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487826)
 * Yes, please enable/disable another snippet while still in safe mode to reset 
   the pre-loaded snippets and you should be good to go.
 *  Thread Starter [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487849)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/) 
   It still doesn’t 
   show up after doing this.
 *  Thread Starter [tnichum](https://wordpress.org/support/users/tnichum/)
 * (@tnichum)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487855)
 * [@gripgrip](https://wordpress.org/support/users/gripgrip/) ahh, nevermind! It
   is fixed now- that’s why!
   Thank you for a VERY quick response!

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

The topic ‘Redirect loop fail’ is closed to new replies.

 * ![](https://ps.w.org/insert-headers-and-footers/assets/icon-256x256.png?rev=2758516)
 * [WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager](https://wordpress.org/plugins/insert-headers-and-footers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-headers-and-footers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-headers-and-footers/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-headers-and-footers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-headers-and-footers/reviews/)

## Tags

 * [Crash](https://wordpress.org/support/topic-tag/crash/)
 * [redirect loop](https://wordpress.org/support/topic-tag/redirect-loop/)

 * 9 replies
 * 2 participants
 * Last reply from: [tnichum](https://wordpress.org/support/users/tnichum/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/redirect-loop-fail/#post-16487855)
 * Status: resolved