Manual:$wgCookieExpiration

Details
The default value is 180 days (180 * 86400 seconds/day).

This means most MediaWiki cookies will last 180 days. This includes, "keep me logged in" cookies, unless $wgExtendedLoginCookieExpiration is used.

Since MediaWiki 1.22 setting this configuration variable to 0 makes cookies session-only.

This was previously documented as working, but broken.

This is used by WebResponse::setcookie and mw.cookie.set, though an individual cookie can have a custom expiration.