Manual:$wgCookieExpiration

Details
Default is 2592000 seconds, which is 30 days. This means MediaWiki users will be logged out automatically 30 days after they log in. Setting this to 0 makes all cookies session-only.

In, the default was raised to 180 days (15552000 seconds).