How To Stay Logged In To WordPress and Never Be logged Out

If you’re working on your local installation of WordPress, you know what its like being logged out all the time.

This code enables you to stay logged in forever.


You can modify the return value which in this case returns the I.D of the admin user which is 1.

Where to Put The Code

Simply add this code to the very end of your WordPress installations wp-config.php file.

The good thing about this code is you don’t even need to login when you start you machine, you’re always logged in and can’t logout unless you remove the code.

Great for Developers working locally all the time.

One response to “How To Stay Logged In To WordPress and Never Be logged Out”

  1. […] How To Stay Logged In To WordPress and Never Be logged Out […]

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.