Fix WP Form Submission Error: The link you followed has expired.

“The link you followed has expired. please try again” is a generic WordPress error that can appear in many situations.

It might seem that the error is caused by WordPress nuances or file limits but that is not always the case.

In relation to form submission, a very specific case that generates this error is when the name attribute for an input field of a form has dashes or hyphens.

<input type="text" name="the-name">

The dash or hyphen in the name attribute causes WordPress to generate the link has expired error when the input value is checked using $_POST.

Replacing the dashes with underscores fixed the problem for me, and I was able to process the form data after that.

It would have been appropriate if I had discussed the underlying cause of this error and why removing dashes from the name attribute solved the problem. In either case, I showed you one possible solution to this problem.