Manual:$wgCookieExpiration

Details
2592000 seconds is 30 days. This means MediaWiki users will be logged out automatically 30 days after they log in.