Customize Expired Password Error Message

When users enter a wrong or expired password, they normally receive an error message like “Please enter the correct password!”.

In some cases, you might want to notify your users that the content is still locked due to expired passwords. This happens when the password usage reaches the limit, or the password is only available for a certain period of time.

In this article, we will guide you on how to show a custom message or redirect users to a specific page when the password entered expires.

At the moment, the function is applicable to individual passwords only.

Requirements:

Show expired password message

Once you install and activate our plugins, go to Password Protect WordPress >> Advanced tab from your admin dashboard.

Simply enable “Customize Expired Password Notification” option, then choose “Customize expired password message” in the drop-down menu.

Since PPWP Password Suite version 1.3.8, you can customize specific expired messages for:

  • Passwords that reach the expiry date
  • Passwords that reach the usage limit

When users enter an expired password, they will receive the message below.

Customize expired password message

You can change this message to whatever you want via WordPress Customizer.

Similar to editing the wrong password message, go to Appearance >> Customize from your WordPress dashboard.

ppwp-customize

Choose Password Protect WordPress Form on the left sidebar.

Choose Error Message section.

Scroll down to the bottom of this section, you will see the option to edit the expired password message.

Please keep in mind that:

  • The values changed via WordPress Customizer are associated with the current theme. So if you are to change your theme, all the customizations will return to the default settings.
  • If you copy a text from Microsoft Word or other website editors into this WYSIWYG Editor, you should clear its format before adjusting its style including color, font size, or font-weight.

Redirect users to a specific URL

You can also encourage users to take action when a password expires, like submitting a contact form or buying a product, to get a new password (instead of simply showing a message).

To do that, simply choose “Redirect users to specific URL” from the drop-down menu under the “Customize Expired Password Notification” option.

Since PPWP Password Suite version 1.3.8, you can redirect users to different URLs when they enter:

  • Passwords that reach the expiry date
  • Passwords that reach the usage limit

Lasted updated on May 18, 2022