前言介紹
- 這款 WordPress 外掛「Debug wp_redirect()」是 2013-02-27 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2022-09-09,距離現在已有 968 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 5 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
debug | redirects | wp_redirect |
內容簡介
重要提示:建議您在完成後關閉偵錯,因為偵錯信息會揭示文件的文件路徑以及從 PHP debug_backtrace() 傳遞到函數的 PHP 參數,其中可能包含敏感信息。
當您有許多插件/主題功能相互作用導致未知重定向時,這很有用。此工具可以幫助您找出正在重定向的是什麼以及在代碼中它正在重定向到哪裡。
此外掛會輸出有關網站前端和管理區域的每個 wp_redirect() 和 wp_safe_redirect() 調用的信息。
用法:使用設置啟用
您可以通過轉到您的網站或您的網絡設置(如果啟用了網絡),轉到設置>除錯 wp_redirect()來啟用重定向除錯。您可以選擇啟用前端請求和/或管理儀錶板請求的除錯。您還可以僅在已登錄或是管理員時才顯示除錯。
如果您遇到此插件防止您需要登錄或禁用重定向的問題,只需重命名此插件或在您的 wp-config.php 文件中定義此選項:define('DEBUG_WP_REDIRECT', false);
用法:通過 wp-config.php 啟用
您可以在 wp-config.php 文件中定義常量,以便為前端/管理儀錶板請求啟用重定向處理。常量覆蓋在管理員設置頁面中設置的任何選項。
要在網站前端啟用重定向除錯:define('DEBUG_WP_REDIRECT', true);
要在網站管理儀錶板中啟用重定向除錯:define('DEBUG_WP_REDIRECT_ADMIN', true);
僅向登錄的站點管理員顯示重定向除錯:define('DEBUG_WP_REDIRECT_LOGGED_IN_ADMIN', true);
僅向登錄的站點用戶顯示重定向除錯:define('DEBUG_WP_REDIRECT_LOGGED_IN', true);
僅向登錄的站點用戶 ID 顯示重定向除錯:define('DEBUG_WP_REDIRECT_LOGGED_IN_USER_ID', true);
用法:通過 PHP 在自己的代碼中啟用除錯
當您希望在某個點之後開始/停止除錯時,可以啟用/禁用除錯。
這些函數將在前端或管理儀錶板請求時開始/停止重定向除錯。
啟用除錯:debug_wp_redirect_enable()
停用除錯:debug_wp_redirect_disable()
用法:作為 mu-plugin
將 debug-wp-redirect.php 文件添加到您的 mu-plugin 文件夾中,位置如下:/wp-content/mu-plugins/debug-wp-redirect.php
您不需要任何其他文件。管理員設置頁面將不會顯示,因此您需要特別使用 wp-config.php 的常量以及上面文檔中記錄的常量。
為此插件做出貢獻
您可以通過 GitHub 或 贊助我的時間 幫助改進此插件。
原文外掛簡介
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 / 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.
This plugin outputs information about each wp_redirect() and wp_safe_redirect() call done on the front and in the admin area 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 );
To only show redirect debugging to logged-in user ID(s) of a site: define( 'DEBUG_WP_REDIRECT_LOGGED_IN_USER_ID', true );
Usage: Enabling debugging through PHP in your own code
You can 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: debug_wp_redirect_enable()
Disable debugging: debug_wp_redirect_disable()
Usage: As an mu-plugin
Take the debug-wp-redirect.php file and add it to your mu-plugin folder in a location like: /wp-content/mu-plugins/debug-wp-redirect.php
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.
Contribute to make this plugin better
You can help to make this plugin better through GitHub or sponsor my time.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Debug wp_redirect()」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 2.0 | 2.1 | 2.0.1 | 2.1.1 | 2.1.2 | trunk |
延伸相關外掛(你可能也想知道)
WP Crontrol 》WP Crontrol 可以讓您查看和控制 WP-Cron 系統中正在發生的事件。從管理界面,您可以:, , 查看所有的 Cron 事件以及它們的參數、循環間隔時間、回撥函數以及...。
Query Monitor – The developer tools panel for WordPress 》ministrator user). This cookie can be set by defining QM_AUTH_KEY in your wp-config.php file., To learn more about how to use Query Monitor, please...。
P3 (Plugin Performance Profiler) 》這個外掛程式可以創建您 WordPress 網站的外掛程式效能概況,並且藉由測量這些外掛對網站載入時間的影響。通常WordPress網站由於過多或配置不佳的外掛程式而...。
Debug Bar 》在管理列上新增一個除錯選單,顯示查詢、快取及其他有用的除錯資訊。, 開發者必備的外掛!, 當啟用WP_DEBUG時,也會追蹤 PHP 的警告和注意事項,使它們更容易...。
WP Debugging 》此外掛在啟用時會在 wp-config.php 中設定以下偵錯常數,並在停用時移除它們。任何錯誤都會導致拋出 PHP Exception。偵錯常數請參考 WordPress 的「Debugging...。
My WP Customize Admin/Frontend 》這個外掛讓管理者和前端使用者都能輕鬆地進行自訂設定。許多自訂篩選器和操作,還包含開發者工具。, 示範網站在這裡:https://tastewp.com/new/?pre-installe...。
reBusted! 》這個外掛可以免去你問「你有清空快取嗎?」的問題。, 這是根據原本由 Paul Clark 開發的外掛更新,以符合今天的 WordPress 和 PHP。, 功能, , 在線上網站上安...。
Debug Log Manager 》Debug Log Manager 可以讓您:, , 單擊啟用 WP_DEBUG 以記錄 PHP、數據庫和 JavaScript 錯誤,不需要手動編輯 wp-config.php 文件,完成後再禁用。 , 在自訂...。
Code Profiler – WordPress Performance Profiling and Debugging Made Easy 》一個可以測量 WordPress 外掛與佈景主題效能的分析工具。, Code Profiler 可以協助您在 PHP 層面上測量您的外掛與佈景主題的效能,並快速找到任何潛在的 Word...。
Plugin Detective – Troubleshooting Conflicts 》Plugin Detective 可以幫助您快速且輕鬆地排除網站上的問題,並找出問題的原因。一旦找到罪犯,您可以快速停用有問題的外掛程式。甚至當您的網站出現白屏、致...。
Dashboard Widgets Suite 》插件名稱:Dashboard Widgets Suite(控制面板小工具套裝), , 該外掛提供 1 個插件與 9 個小工具,可簡化您的工作流程並提高工作效率。該套裝小工具包括以下...。
which template file 》想知道 WordPress 在前台顯示頁面時使用哪個模板嗎?, 這個外掛可以幫您達成這個目的。您可以在免費的模擬網站上嘗試使用:點此連結 => https://tastewp.c...。
Debug This 》Debug This是由友好Macho Themes團隊打造、維護和運營的獨立外掛程式。, 對於管理員、開發人員和支援人員,Debug This提供了大量的有關WordPress安裝的信息,...。
Debug Log – Manager Tool 》這是一個簡單的除錯日誌外掛程式,您可以在儀表板中檢查除錯日誌。透過一個點擊,您可以啟用或停用除錯功能(例如 ‘ WP_DEBUG’、‘WP_DEBUG...。
Debug 》Debug 可以透過編輯 wp-config.php 檔案,幫助您在 WordPress 網站中找到錯誤。您可以使用 Debug 外掛啟用錯誤報告功能,在 WordPress CMS/網站上啟用任何運...。