How to Create Registration Form in WordPress Without Plugin?

After a lot of study about WordPress, we found the most asked question about WordPress is: How to Create Registration Form in WordPress Without Plugin?
So the Answer we have explained below. Head over the code and show your talent.

How to Create Registration Form in WordPress Without Plugin_

Yes, We can Create a Custom register form without using any plugin.
Below I will tell you to step by step Example in details that I have already implemented in a WordPress website.

First We need to Create a template for the register form:
Let say tmpl-register.php is our file name:

Now the form is ready. Please check for the id and proper classes.
In this form i am using the Jquery validation.

To use jquery you need to include the file jquery.validate.js. You can get this online by Search on google.
you can add the jquery in your footer.php file or any new js file.
I am using the validation in the footer.php file
First we need to include the file
<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.validate.js"></script>

And the code for Validation:

In the Above code you will see the id and the classes used for the proper validation. And you can change and add the new messages as per your requirements.

Here you noticed i have given the url.
url: '<?php echo get_template_directory_uri(); ?>/template-parts/reg-ajax.php',

So the New file would be reg-ajax.php. This file is used for Insert the new user to the database.

Just follow the code you will understand.

File name: reg-ajax.php. As you see i have given in the url template-parts/reg-ajax.php. That means i have put this file in the template-parts folder into my theme folder. you can place it outside the folder as you want with changing of your path name.


I have placed all three files in the template-parts folder. In this Twenty-sixteen theme used.

You can use in any theme. the code will work just use the proper id and remember to include the jquery as well.

You can add more fields and validation according to the requirements.

If you have more question go Comments below. We would love to hear from you,