I am use to php development in general and I am use to getting a lot done by making a POST to a php file. However I have not seen people using $_POST in WordPress. I have seen one discussion about someone wanting to create new posts on their blog using $_POST, and they were directed to a more secure system. (Perhaps I misunderstood the conversation though.)

I would still like to use $_POST simply as a part of the user interface.

If it is possible and not a horrible idea to use $_POST what do I need to know to make $_POST work well with WordPress? Are there rules about making a $_POST, or how redirecting so that nothing interferes with WordPress behavior? Are there any other special considerations?

  • Yes, you can do AJAX programming. Now what is the question, really?
    – s_ha_dum
    Commented May 8, 2014 at 14:02
  • Okay you got me, added the real question to the bottom. Commented May 8, 2014 at 14:06
  • 1
    We have a one question per question rule, anything other than your main focus can you split it off so that they can be answered separately? If you don't then your question won't get as many answers and runs the risk of being too broad ( what if someone declines to answer because they have an answer for the first question but not the second? )
    – Tom J Nowell
    Commented May 8, 2014 at 14:15

2 Answers 2


WordPress is an HTTP/PHP web application. The ordinary rules of HTTP and PHP apply, and work. WordPress itself uses $_POST and $_GET more times than I can count. If you want to pass information from one page to another-- say from a form to a search handler-- you have to use one or the other.

There are some helper functions like add_query_arg() that might be applicable but as written your question is too broad to allow for specifics.


It's worth mentioning that if you're implementing your own $_POST/GET variables, make sure you avoid conflicts with built-in WordPress ones:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.