Integrated Tech Solutions

PHP Code to login a user programatically in WordPress

By - Admin, Updated on February 22, 2024

 $user = get_user_by('id', $userid);
 wp_clear_auth_cookie();
 wp_set_current_user($user->data->ID);
 wp_set_auth_cookie($user->data->ID);

Keep Reading

👋 Hi, Find this Helpful? There is More

20 Most asked Odoo Interview Questions

Odoo Accounting Interview Questions

Know More »
shopify sections and blocks

How to create Custom Sections in Shopify[Dawn Theme]

Are you looking to customize your Shopify store beyond the standard templates and themes? Do you want to create unique...

Know More »
fix japanese keyword hack

Looking for Video Tutorials?

Explore Our Youtube Channel for in-depth Tutorials

Yes I am Curious »