How to log the parameters in POST HTTP requests

Avatar
  • Answered
I see single POST requests to wp-login.php and xmlrpc.php fairly frequently in the HTTP access logs for my account. Figure someone is trying passwords or something? I'd like to see more about they're doing, but HTTP access logs don't include the parameters for POSTs. Is there any way to set that up in WordPress on my site?
Avatar
Tim S.
Good morning,

Thanks for your question about logging the post request data. Currently, there's a few modules within Apache that could potentially do it. However, this option would not be available in shared and is not recommended. If you're getting flooded with requests storing the data could potentially grow the logs sizes very quickly. Also, the data would likely be stored in plain text which (in some cases, would be password data).

If you're on a VPS or Dedicated server and would like more information on how to log POST requests, we can provide more.

I hope this helps!

Thanks!

Tim S