The Request Logger WordPress plugin logs headers from requests to the server. It is useful when sitting behind a proxy or multiple proxies to determine the headers being returned.
To install the Request Logger plugin, follow these steps:
- Download the PHP code for the plugin.
- Zip the PHP code to create a WordPress plugin file (e.g.,
request-logger.zip
).
- Log in to your WordPress admin dashboard.
- Go to "Plugins" and click on "Add New."
- Click on the "Upload Plugin" button.
- Choose the
request-logger.zip
file you created earlier and click "Install Now." - After installation, click "Activate Plugin" to activate the Request Logger plugin.
- Once activated, the Request Logger plugin adds a new menu item under "Tools" called "Request Logger."
- Click on "Request Logger" to access the plugin settings page.
- On the settings page, you will find a checkbox labeled "Enable logging." Check this box to enable request header logging.
- Click the "Save Changes" button to save your settings.
The logs generated by the Request Logger plugin are stored in the following directory:
<plugin_directory>/logs/
To view the contents of a log file, follow these steps:
- Access the server where WordPress is installed.
- Navigate to the plugin directory and then the "logs" subdirectory.
- Locate the log file you wish to view (e.g.,
request-log-<date>.log
). - Download the log file to your local machine.
- Open the log file using a text editor to view its contents.
Remember to disable the Request Logger plugin when you have finished reviewing the logs. To disable logging:
- Go to the "Request Logger" settings page under "Tools."
- Uncheck the "Enable logging" checkbox.
- Click the "Save Changes" button.
By default, the Request Logger plugin will automatically disable logging after 30 minutes of activation. This feature can be enabled or disabled in the plugin settings.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contact me on Twitter, DEV Community or LinkedIn if you have any questions or suggestions.
Or just visit my website to see what I do.