I have found a really great tutorial about creating a plugin that verifies email for new users: Email verification for new users

Is there any possibility to do this directly with core editing and without a plugin?

  • If you want to create the possibility of messing things up every time there is a core update, sure that's possible, but it's still not a very smart idea.
    – cjbj
    Aug 30, 2016 at 15:14
  • Never edit WP Core itself, all your changes would be overwritten on update, and the code you'd write can be turned into a plugin by putting a comment at the top of the file anyway
    – Tom J Nowell
    Aug 30, 2016 at 15:24

2 Answers 2


As many people would agree, editing WordPress' core is not recommended because any updates that are made from the official developer (ex: 4.6 to 4.6.1) will override your changes. Plus, editing the core could potentially break your website or any other theme/plugin if it's not properly edited.

This is where plugins come in, they are packed functions that acts as an add on to enhance your WordPress site.

However, if you do not want to use a plugin to achieve this functionality. Your best solution is to add your custom code in your child theme's functions.php file which runs your custom codes on top of WordPress.

Update: per Youssef's comment below

...what code should I add to functions.php to get users to verify their email?

It wouldn't be a few lines of code to add to your functions.php, I can tell you that much.

This will require some work and research on your end since I can't write up something like this. The right approach is to try and solve this question yourself with your own function. Then, when you run into an issue you can't solve, that's where the WPSE community is here for.

We don't want our members to ask people to create a solution without attempting it themselves.

To start, I'd look into other plugins or functions that are available tailor the codes for yourself. For example, this plugin: User Activation Email is worth looking into. Just download the .zip file and play around with the source codes.

Otherwise, if you are not comfortable with any of this, your best bet is to utilize a plugin that already exists. As I mentioned in my original answer, editing WordPress' core is not recommended.

  • Thank you so much, what code should i add then to functions.php to get users to verify their email ? Aug 30, 2016 at 16:05
  • @YoussefMeskaoui Updated my answer in regards to your question. Aug 31, 2016 at 5:45
  • @YoussefMeskaoui Glad to help. Be sure to click the checkmark next to my answer to indicate that your question has been resolved. Aug 31, 2016 at 11:53

You don't have to change Wordpress's core, you can add this within your theme files. Functions.php would be one way, or just include/require a class in your funtions.php to keep things neat.

 require get_template_directory() . '/verify_user.php';
  • Hello, thank you for your response ! what is the code inside "/verify_user.php" ? Aug 30, 2016 at 16:04

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.