Important: It is not recommended you leave debugging enabled when you’re done, the debug information exposes file paths of files as well as PHP arguments passed into functions from the PHP
debug_backtrace() which may contain sensitive information.
This is useful for those times when you have a lot of plugins and theme functions interacting and you just need to figure out what / where it’s redirecting.
This plugin outputs information about each
wp_redirect() call done on the front of a site.
USAGE: ENABLING WITH THE SETTING
You can enable redirect debugging by going to
Settings > Debug wp_redirect() on your site or in your network settings (if network activated). You have the option to enable debugging for frontend requests and/or admin dashboard requests. You also have the ability to only show debugging if the person is logged in or is an admin.
If you encounter problems with this plugin blocking redirects you need for logging in or being able to disable the redirect, simply rename the plugin or define this in your wp-config.php file:
define( 'DEBUG_WP_REDIRECT', false );
USAGE: ENABLING THROUGH WP-CONFIG.PHP
You can define constants in your wp-config.php file to enable redirect handling for frontend / admin dashboard requests. Constants override any options set in the admin settings page.
- To enable redirect debugging on the frontend of a site:
define( 'DEBUG_WP_REDIRECT', true );
- To enable redirect debugging in the admin dashboard of a site:
define( 'DEBUG_WP_REDIRECT_ADMIN', true );
- To only show redirect debugging to logged in admins of a site:
define( 'DEBUG_WP_REDIRECT_LOGGED_IN_ADMIN', true );
- To only show redirect debugging to logged in users of a site:
define( 'DEBUG_WP_REDIRECT_LOGGED_IN', true );
USAGE: ENABLING DEBUGGING THROUGH PHP IN YOUR OWN CODE
You can programmatically enable/disable debugging when you have your own code you want to start/stop debugging after a certain point.
These functions will start/stop debugging the redirects whether it’s on a frontend or admin dashboard request.
- Enable debugging:
- Disable debugging:
CONTRIBUTE TO MAKE THIS PLUGIN BETTER
- Unpack the entire contents of this plugin zip file into your
- Upload to your site
- Navigate to
wp-admin/plugins.phpon your site (your WP Admin plugin page)
- Activate this plugin
OR you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin’s name