Drastically while you build-up a huge WordPress website BUT if you (in case) forget to consider strongly on how a user can log-in programmatically then what happens. Well, to ease your this mental job, using the following snippet in your theme’s functions.php file, you will be able to log-in a WordPress user programmatically.

Snippet Source/Credit: emoticode