The Link You Followed Has Expired: WordPress Fix

Fix "The link you followed has expired" in WordPress. Learn why a big upload trips the security check, how to raise post_max_size and a free limit checker.

Share this post
8 min read

Last updated December 3, 2026

“The link you followed has expired” is WordPress telling you a security check failed. Most often, your upload was bigger than the server allows.

When a file is larger than the PHP setting post_max_size, PHP drops the whole request. WordPress then cannot find its security token, so it shows this message.

Key Takeaways

  • The message comes from the WordPress function wp_nonce_ays, used when a security check fails.
  • The usual cause is a theme, plugin or media file bigger than post_max_size.
  • Raise post_max_size and upload_max_filesize, with post_max_size the larger one.
  • A page left open too long can also trigger it, because security tokens expire.
  • Check your current limits in Tools, Site Health, Info, Server.

Digieh upload limit checker

Find your limits in WordPress under Tools, then Site Health, then Info, then Server. Enter them below.

Digieh tool. Logic from the PHP manual and WordPress code reference, read December 3, 2026. Runs in your browser only.

Back up first. Editing php.ini, .htaccess or wp-config.php can take a site down if a line is wrong. Save a copy of each file before you change it.

What Does “The Link You Followed Has Expired” Mean?

WordPress protects forms with a one-time security token called a nonce. When the token is missing or too old, WordPress stops the action.

The screen shows the title “An error occurred”. Below it is the message “The link you followed has expired.” and a “Please try again” link.

Source: WordPress code reference, wp_nonce_ays, read December 3, 2026.

Why Does It Happen When You Upload a Theme or Plugin?

The PHP manual explains the cause. If post data is bigger than post_max_size, the $_POST and $_FILES data arrive empty.

The security token travels in that same data. With it gone, WordPress thinks the link expired, even though you only clicked a second ago.

PHP settingPHP defaultWhat it limits
upload_max_filesize2MThe size of one uploaded file
post_max_size8MAll the data in one form send, files included
memory_limit128MMemory one PHP script can use

Source: PHP manual, core php.ini directives, read December 3, 2026.

Hosts often change these defaults. Always check your own values first, because many hosts already allow far more than 8M.

3 settingsDigieh mapped the three PHP limits behind this error on December 3, 2026.

How Do You Check Your Current Upload Limits?

  1. In WordPress, go to Tools, then Site Health.
  2. Open the Info tab.
  3. Expand the Server section.
  4. Note the upload max filesize and PHP post max size values.

The Media, Add New screen also shows a maximum upload file size. Compare it with the size of the file you are trying to upload.

How Do You Fix It by Raising the Limits?

Pick the method your host supports. Many hosts offer a PHP settings page, which is the safest way.

Option 1: Your host’s PHP settings

Look for PHP Options or PHP Configuration in your hosting panel. On cPanel, it is often called the MultiPHP editor. Raise upload_max_filesize and post_max_size, then save.

Option 2: php.ini or .user.ini

Add or edit these lines in the php.ini or .user.ini file in your site folder.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Option 3: .htaccess on Apache

Some Apache hosts with mod_php accept these lines. If your site shows a 500 error after saving, remove them at once.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300

PHP lists both upload settings as changeable per directory, which is why these files can work. On some hosts, only the host can change them.

Try this today. Set post_max_size equal to or larger than upload_max_filesize. PHP says post_max_size must be the larger value.

Why Does the Error Not Say What Is Wrong?

By the time WordPress runs its check, PHP has already thrown the upload away. WordPress only sees an empty request with no token.

It cannot tell an oversized file from an old or fake link. So it shows the same general message for every failed check.

That is why the fix is usually on the server, not inside WordPress. The settings that matter live in PHP, which your host controls.

Free updates

Join the Digieh list

Be the first to know when our weekly brief launches.

No spam. Unsubscribe anytime. Read our Privacy Policy.

What Size Limits Should You Set?

If you uploadupload_max_filesizepost_max_size
Normal images and documents16M20M
Themes and most plugins64M64M
Large page builder themes or videos128M128M

Source: Digieh suggestions based on the PHP manual rule that post_max_size must be larger, December 3, 2026.

Do not set limits far higher than you need. Very large values let anyone with an account push huge files to your server.

After you change a limit, reload Tools, Site Health, Info, Server. The new values should show there before you try the upload again.

How Do You Fix It on Shared Hosting?

  1. Check your limits in Site Health first.
  2. Look for PHP settings in your hosting panel and raise both values.
  3. If you see no such option, open a support chat with your host.
  4. Ask them to raise upload_max_filesize and post_max_size for your site.
  5. Meanwhile, upload large files through the host’s file manager.

Hosts can see your server settings directly. A support request is often the fastest fix on cheap shared plans.

What If Your File Is Small?

If the upload is well under your limits, the token may simply be old. WordPress says a nonce is valid for between 12 and 24 hours by default.

Source: WordPress code reference, wp_verify_nonce, read December 3, 2026.

  • Reload the admin page, then try the action again.
  • Clear any page cache that may serve old admin pages.
  • Log out and log back in to get fresh tokens.
  • Disable plugins one by one if the message appears on every form.

Can You Upload Without Changing Limits?

Yes. For a large theme or plugin, you can skip the browser upload.

  • Upload the unzipped folder by SFTP to wp-content/themes or wp-content/plugins.
  • Use your host’s file manager to upload and extract the zip file.
  • Install from the WordPress directory inside the dashboard, if the item is listed there.

After uploading by SFTP, activate the theme or plugin from the dashboard as usual. This route skips PHP upload limits entirely, so file size no longer matters.

Does max_execution_time Matter?

Sometimes. A large upload on a slow connection can take a long time. If PHP stops the script before the upload finishes, the request can fail.

Raising max_execution_time gives slow uploads more time. Many guides suggest 300 seconds while you install a large theme.

It is not the main cause of this message, though. If the file is bigger than post_max_size, more time will not help.

How Do You Stop It From Coming Back?

  • Keep post_max_size a little above the largest file you upload.
  • Compress big images before you upload them.
  • Install themes and plugins from the WordPress directory when you can.
  • Write down your limits so you can check them after a host or PHP change.

A PHP upgrade or a move to a new host can reset these values. Check Site Health after any such change.

Which Related Errors Look Similar?

A file bigger than upload_max_filesize alone usually shows a size error instead. Our guide to the WordPress upload max filesize error covers that case.

If uploads fail with a plain “HTTP error”, read WordPress HTTP error on upload. If PHP runs out of memory, see WordPress memory exhausted error.

What were you doing when the message appeared?

  • Uploading a theme
  • Uploading a plugin
  • Uploading media
  • Saving a form
  • Not sure

Test Yourself

A 20 MB theme upload fails with this message. Which limit is most likely too low?

  1. memory_limit
  2. post_max_size
  3. max_input_vars

If post data is bigger than post_max_size, PHP empties the upload data, so the security token is lost.

Which value must be larger, according to PHP?

  1. upload_max_filesize
  2. post_max_size
  3. They must be equal

The PHP manual says post_max_size must be larger than upload_max_filesize.

Frequently Asked Questions

How do I fix “The link you followed has expired” in WordPress?

Raise post_max_size and upload_max_filesize above your file size, or upload the file by SFTP.

Is this error a hack or a security problem?

No. It is a normal security check that fails when the upload data or token is missing.

Why does it happen on a small file?

The page may be old. Reload it, clear the cache and log in again.

Where do I see my upload limits?

Go to Tools, Site Health, Info, Server in the WordPress dashboard.

Conclusion

Check your upload limits, raise post_max_size above your file size, and try again. If you cannot change the limits, upload the theme or plugin by SFTP instead.

Editor’s Note

This guide is accurate as of December 3, 2026. It is based on the WordPress code reference and the PHP manual. Hosting panels and file locations differ, so follow your host’s own guide where it exists.

Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.

Keep exploring

Your next read is waiting

Found this useful?

Share this post
Avatar photo

Syed Wasif Raza

Syed Wasif Raza is the founder and editor of Digieh. He writes about health, food, lifestyle, news and sports in plain, easy English. Every guide he publishes is checked against official sources such as government and health agency pages. Connect with him on LinkedIn.

Articles: 1028

Leave a Reply

Your email address will not be published. Required fields are marked *