{"id":22268,"date":"2013-02-28T15:07:18","date_gmt":"2013-02-28T15:07:18","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/debug-wp-redirect\/"},"modified":"2022-09-09T15:52:16","modified_gmt":"2022-09-09T15:52:16","slug":"debug-wp-redirect","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/debug-wp-redirect\/","author":380654,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.1.2","stable_tag":"2.1.2","tested":"6.1.10","requires":"4.5","requires_php":"5.6","requires_plugins":"","header_name":"Debug wp_redirect()","header_author":"Scott Kingsley Clark","header_description":"","assets_banners_color":"","last_updated":"2022-09-09 15:52:16","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.scottkclark.com\/","header_plugin_uri":"https:\/\/www.scottkclark.com\/","header_author_uri":"https:\/\/www.scottkclark.com\/","rating":4.8,"author_block_rating":0,"active_installs":100,"downloads":10434,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"sc0ttkclark","date":"2017-05-07 08:19:49"},"1.1":{"tag":"1.1","author":"sc0ttkclark","date":"2017-05-07 08:22:34"},"2.0":{"tag":"2.0","author":"sc0ttkclark","date":"2021-06-04 16:41:02"},"2.0.1":{"tag":"2.0.1","author":"sc0ttkclark","date":"2022-03-05 17:39:20"},"2.1":{"tag":"2.1","author":"sc0ttkclark","date":"2022-03-11 17:07:28"},"2.1.1":{"tag":"2.1.1","author":"sc0ttkclark","date":"2022-09-09 15:42:31"},"2.1.2":{"tag":"2.1.2","author":"sc0ttkclark","date":"2022-09-09 15:52:16"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":1,"5":4},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","2.0","2.0.1","2.1","2.1.1","2.1.2"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[94,726,23060],"plugin_category":[59],"plugin_contributors":[78441],"plugin_business_model":[],"class_list":["post-22268","plugin","type-plugin","status-closed","hentry","plugin_tags-debug","plugin_tags-redirects","plugin_tags-wp_redirect","plugin_category-utilities-and-tools","plugin_contributors-sc0ttkclark","plugin_committers-sc0ttkclark"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/debug-wp-redirect.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><em>Important:<\/em> 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 <code>debug_backtrace()<\/code> which may contain sensitive information.<\/p>\n\n<p>This is useful for those times when you have a lot of plugins \/ theme functions interacting that cause an unknown redirect. This tool helps you figure out what is redirecting and where it's redirecting at in the code.<\/p>\n\n<p>This plugin outputs information about each <code>wp_redirect()<\/code> and <code>wp_safe_redirect()<\/code> call done on the front and in the admin area of a site.<\/p>\n\n<h4>Usage: Enabling with the setting<\/h4>\n\n<p>You can enable redirect debugging by going to <code>Settings &gt; Debug wp_redirect()<\/code> 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.<\/p>\n\n<p>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: <code>define( 'DEBUG_WP_REDIRECT', false );<\/code><\/p>\n\n<h4>Usage: Enabling through wp-config.php<\/h4>\n\n<p>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.<\/p>\n\n<ul>\n<li>To enable redirect debugging on the frontend of a site: <code>define( 'DEBUG_WP_REDIRECT', true );<\/code><\/li>\n<li>To enable redirect debugging in the admin dashboard of a site: <code>define( 'DEBUG_WP_REDIRECT_ADMIN', true );<\/code><\/li>\n<li>To only show redirect debugging to logged-in admins of a site: <code>define( 'DEBUG_WP_REDIRECT_LOGGED_IN_ADMIN', true );<\/code><\/li>\n<li>To only show redirect debugging to logged-in users of a site: <code>define( 'DEBUG_WP_REDIRECT_LOGGED_IN', true );<\/code><\/li>\n<li>To only show redirect debugging to logged-in user ID(s) of a site: <code>define( 'DEBUG_WP_REDIRECT_LOGGED_IN_USER_ID', true );<\/code><\/li>\n<\/ul>\n\n<h4>Usage: Enabling debugging through PHP in your own code<\/h4>\n\n<p>You can enable\/disable debugging when you have your own code you want to start\/stop debugging after a certain point.<\/p>\n\n<p>These functions will start\/stop debugging the redirects whether it's on a frontend or admin dashboard request.<\/p>\n\n<ul>\n<li>Enable debugging: <code>debug_wp_redirect_enable()<\/code><\/li>\n<li>Disable debugging: <code>debug_wp_redirect_disable()<\/code><\/li>\n<\/ul>\n\n<h4>Usage: As an mu-plugin<\/h4>\n\n<p>Take the debug-wp-redirect.php file and add it to your mu-plugin folder in a location like: <code>\/wp-content\/mu-plugins\/debug-wp-redirect.php<\/code><\/p>\n\n<p>You won't need any other files. The admin settings page will not show up so you will need to use mu-plugin mode specifically with the constants for wp-config.php as documented above.<\/p>\n\n<h4>Contribute to make this plugin better<\/h4>\n\n<p>You can help to make this plugin better through <a href=\"https:\/\/github.com\/sc0ttkclark\/debug-wp-redirect\">GitHub<\/a> or <a href=\"https:\/\/github.com\/sponsors\/sc0ttkclark\">sponsor my time<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unpack the entire contents of this plugin zip file into your <code>wp-content\/plugins\/<\/code> folder locally<\/li>\n<li>Upload to your site<\/li>\n<li>Navigate to <code>wp-admin\/plugins.php<\/code> on your site (your WP Admin plugin page)<\/li>\n<li>Activate this plugin<\/li>\n<\/ol>\n\n<p>OR you can just install it with WordPress by going to Plugins &gt;&gt; Add New &gt;&gt; and type this plugin's name<\/p>\n\n<!--section=changelog-->\n<h4>2.1.2 - September 9th, 2022<\/h4>\n\n<ul>\n<li>Fixed: Added more checks for <code>is_user_logged_in()<\/code> function calls to be able to handle earlier redirect debugging.<\/li>\n<\/ul>\n\n<h4>2.1.1 - September 9th, 2022<\/h4>\n\n<ul>\n<li>Added: Now you can use debug-wp-redirect.php as an mu-plugin more easily.<\/li>\n<li>Fixed: User ID setting was not saving properly.<\/li>\n<li>Fixed: Resolved problems with user-restricted debugging -- sometimes redirects could not be debugged when requiring a logged in user because the plugin attempted to check for access before the user functions were available to use.<\/li>\n<\/ul>\n\n<h4>2.1 - March 11th, 2022<\/h4>\n\n<ul>\n<li>Added new option to only show debugging if the person is logged in as specific user ID(s).<\/li>\n<\/ul>\n\n<h4>2.0.1 - March 5th, 2022<\/h4>\n\n<ul>\n<li>Updated the text on the debug output so that it includes where the debugging is coming from and gives a handy link to admins to disable the debugging output.<\/li>\n<li>Updated compatibility with WordPress 5.9+<\/li>\n<\/ul>\n\n<h4>2.0 - June 4th, 2021<\/h4>\n\n<ul>\n<li>Implemented new functions <code>debug_wp_redirect_enable()<\/code> and <code>debug_wp_redirect_disable()<\/code> to easily turn debugging on programmatically.<\/li>\n<li>Added new functionality to allow showing debugging only to those who are logged in.<\/li>\n<li>Added settings and network settings pages for the plugin so it's easier to configure.<\/li>\n<li>Now requiring PHP 5.6+<\/li>\n<li>Updated compatibility with WordPress 5.7.1<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Default for plugin is not to output unless <code>DEBUG_WP_REDIRECT<\/code> is defined and set to true<\/li>\n<li>Updated plugin to allow for translations of text<\/li>\n<li>Cleaned up debugging output<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Just a simple wp_redirect debug plugin, nothing fancy to see here<\/li>\n<\/ul>","raw_excerpt":"What the.. Where&#039;d that redirect come from? This plugin helps to uncover redirects as they happen.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/22268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=22268"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sc0ttkclark"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=22268"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=22268"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=22268"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=22268"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=22268"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=22268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}