• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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.

Register for full access


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.

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems