简体   繁体   中英

WordPress won't stay logged in

I moved my WordPress install from a development server to a freshly installed CentOS Apache 2.2 PHP 5.3 server. Initially, everything was working well. Logging in wasn't a problem, but then I noticed after logging in as a WordPress user and loading a new page I would be logged out.

What PHP settings do I need to have enabled, or are there any other considerations, when using a fresh server for WordPress that would make users not able to stay logged in (almost like the session isn't saving them)?

edit

It seems like the server isn't logging people in, but is reading the $_POST variable, so why would WordPress not save logging in?

The answer was looking at output_buffer . When this was off, the wp functions couldn't save to the session because something was already writing to the header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM