I am making a login form in WordPress and i want to have a validation on it, so i tried to look at the wp-login.php to see how they validate things. But i did not find what i am looking for. I would like to know how they validate things or what input do they need to validate things. I tried to search the WordPress forums all i can find is plugin, plugin and more plugin. I don't want a plugin. I want to hard code it. So please help me.

I want to know where you can find the part that searches for the user's username and password. Or if not, know what is needed for a successful login. example username or password or others. by the way here is the wp-login.php. Thanks

  • Just to let you know, no one here will tell you how to hardcode it into WordPress Core. Hacking core is a bad idea. Any code we give you will be in the form of a plugin.
    – EAMann
    Commented Feb 14, 2012 at 16:32
  • 1
    When you say hard code it, do you mean within your theme? Commented Feb 14, 2012 at 17:32
  • 1
    Yes, my theme. any ideas??
    – tomexsans
    Commented Feb 14, 2012 at 17:36
  • Just to clear up some confusion - it does not appear that he is trying to edit a core file. Rather you can have a wp-login.php file in your theme. Commented Feb 14, 2012 at 17:50

3 Answers 3


Look in wp-includes/general-template.php at the function wp_login_form(). Follow the functions called there. I’d say: just use wp_login_form(). It does probably everything you need, and you can customize it.

  • i had a hard time locating these files, do you know a site or a linke that has a directory mapping of these files. nice tip though
    – tomexsans
    Commented Feb 14, 2012 at 18:06
  • I use Eclipse and the WordPress core as a separate project. Then I just through this project.
    – fuxia
    Commented Feb 14, 2012 at 18:17

Don't edit wp-login.php file. Instead create a new page for your login. If you don't have any coding knowledge use readymade plugins. There are many plugins available to create frontend login form.

For example check this Profile builder plugin.

Also check Theme my login plugin


I would use this in your situation:


Yes - it's a plugin: You then just drop wp-login.php as a page template in your theme.

Note - try it without the plugin - it may not even be needed at this point.

Here are some tutorials that do it without a plugin:




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.