Manual:$wgPasswordExpirationDays/de-formal

Details
The number of days that a user's password is good for. After this number of days, the user will be prompted to change their password every time they log in. After an additional period defined by, the user will be forced to change their password the next time they log in.

This setting is false by default, meaning that passwords do not expire.