How to Stay Logged in for a longer period in your WordPress?

How to Stay Logged in for a longer period in your WordPress? [STEP BY STEP]☑️

Today in this documentation we will show you how to stay logged in for a longer period in WordPress. By default WordPress keep users logged in for maximum of 48 hours before logging them out or if they chose to close the browser before.What WordPress does, is create a login session cookie upon user login and set expiration date accordingly. After that time period, session cookie expires automatically and WordPress requires user to login again.

Video Tutorial– How to Stay Logged in for a longer period in your WordPress

Follow the steps to stay logged in for longer period in WordPress:

Step::1 First of all you must know the theme which is currently activated in your website.

So for that login to your WordPress dashboard and go to Appearance tool and choose the Theme option

How to Stay Logged in for a longer period in your WordPress

Step::2 From here you can know the Current active theme (EduExpert)

How to Stay Logged in for a longer period in your WordPress

Step::3 Now that you know the theme, login to your cPanel and click on File Manager section

How to Stay Logged in for a longer period in your WordPress

Step::4 Go to public_html

How to Stay Logged in for a longer period in your WordPress

Step::5 Go to the WordPress installation directory and open wp-content folder

How to Stay Logged in for a longer period in your WordPress

Step::6 Now go inside themes folder

How to Stay Logged in for a longer period in your WordPress

Step::7 Next go to the active theme(here it is eduexpert) directory

How to Stay Logged in for a longer period in your WordPress

Step::8 Find functions.php file and right click over the file and choose the Edit option

How to Stay Logged in for a longer period in your WordPress

Add the following code snippet to the functions.php.

================================

add_filter( 'auth_cookie_expiration', 'stay_logged_in_for_1_year' ); 
function stay_logged_in_for_1_year( $expire ) {
return 31556926; // 1 year in seconds
}

=================================

How to Stay Logged in for a longer period in your WordPress

Step::9 You can even customize the time and update accordingly if you want to be longer or shorter.

How to Stay Logged in for a longer period in your WordPress

Step::10 Finally click on Save Changes button.

Thanks for Reading this article !!! We hope this was helpful to you all.

For more information, kindly follow us on social media like Twitter and Facebook and for video tutorials, subscribe to our YouTube channelhttps://youtube.com/redserverhost.com 

Facebook Page https://facebook.com/redserverhost

Twitter Pagehttps://twitter.com/redserverhost.com

If you have any suggestions or problems related to this tutorial, please let us know via the comment section below.

Tags: cheap linux hostingbuy linux hostingcheap reseller hostingbuy reseller hostingbest reseller hostingcheap web hostingcheapest web hostingcheapest reseller hosting,  cheap reseller hostcheap linux hostcheapest linux hostingbest linux hostingbest web hosting