Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was just testing the password-protected posts functionality and when I submit the password it sends me to a 404 page. The password I typed in was correct, I made sure. The URL bar says: www.mydomain.com/wp-pass.php but shows a 404 page. Whether the password is correct or wrong, it should either show some message about it being wrong or the post that was protected. Not just a 404 page.

What could be causing this? Thanks in advance for any ideas.

share|improve this question
Does your browser send a Referer header? –  toscho Dec 6 '12 at 11:20
I'm afraid I don't know what you mean. Could you explain? –  charlenemasters Dec 6 '12 at 11:39
See wp-pass.php: wp_safe_redirect(wp_get_referer()); If your browser does not send a Referer you might get problems. Your browser offers a debugger where you can see the network communication. –  toscho Dec 6 '12 at 11:54
So this is something specific to the browser that is being used to view the website and not Wordpress itself? I use Firefox 17, but I also tested it in Chrome 23 and I'm getting the same error. –  charlenemasters Dec 6 '12 at 14:24
Some proxies are stripping the referer too, no matter what browser you are using. I don’t know if that is the cause for your problem. It could be. –  toscho Dec 6 '12 at 14:31

2 Answers 2

Ok, figured it out myself! I had used add_filter to customize the password form in order to add css classes. Everything in add_filter was either old or simply wrong. I found it in a tutorial, but this has been a lesson to me. Never trust code found on the web unless it from the Codex or an absolute expert.

EDIT: Just found the same piece of code in the Codex as well *facepalm. It says "THIS NO LONGER WORKS" above it, but then why is it still in the codex? To anyone having this problem as well: in case you have used the code from here: Using Password Protection: Password Form Text you'll get problems in newer versions of Wordpress.

share|improve this answer

Change the instance of wp-pass.php to /wp-login.php?action=postpass

share|improve this answer
Please add more detail to this answer. –  s_ha_dum Mar 22 at 22:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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