Hello Friends, Now we going to learn how to fight nasty session Expired Error or will eleminate once and for all “Session expired” error.

Follow these easiest or simplest steps and we make sure you will never see or read this again!

Let’s Start


You will need to edit your Theme functions.php file, it should be located in wp content/themes/your_theme_ name folder on the server.

You can also edit this file from WordPress Dashboard, just navigate to Appearance > Editor.

The following code should be added to file:

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

In our case, 31556926 is 1 year in seconds , and you can also change the value to your by own .

Save your changes to file when you are done.
You have successfully extended the login session on your WordPress bases site.

That’s it Thank you Watching @thinknowledge