WordPress “The link you followed has expired” — Fixing Upload POST Size Limits (Apache proxy_fcgi + PHP-FPM)

WordPress’s “The link you followed has expired” is often a misleading symptom of a server-side upload rejection. When PHP (or the web server) refuses a large POST body—like a theme/plugin ZIP—WordPress never receives the request and falls back to that generic message. The fix is to raise post_max_size and upload_max_filesize (plus a sensible memory_limit), restart PHP-FPM, and re-try the upload.

Table of Contents

If you’ve ever tried to upload a theme or plugin in WordPress and gotten the frustrating message:

The link you followed has expired.

…you already know how unhelpful that error is.

The good news: a very common cause is straightforward—your server rejected the upload before WordPress could even process it.

Symptoms

Typical user report:

  • Uploading a theme/plugin ZIP from WP Admin → Appearance → Themes → Add New → Upload Theme (or Plugins → Add New → Upload Plugin) fails.
  • WordPress shows: “The link you followed has expired.”

If you check your web server logs, you may see something like this (Apache + PHP-FPM via proxy_fcgi):

That line is the real clue.

What it means

WordPress uses a normal HTTP POST request for uploads.

In the log above:

  • The browser attempted to POST 20,303,882 bytes (~19.4 MB)
  • PHP’s configured maximum POST body size was 8,388,608 bytes (8 MB)

So PHP refused to accept the request body and aborted the request at startup.

Because the request never completed properly, WordPress can’t validate the upload flow and falls back to the generic message: “The link you followed has expired.”

The fix

Increase PHP’s upload and POST limits so they’re larger than the file your user is uploading.

At minimum, set post_max_size and upload_max_filesize above your expected upload size.

A practical baseline for WordPress admin uploads is 64M:

  • upload_max_filesize = 64M
  • post_max_size = 64M
  • memory_limit = 256M (helps with theme/plugin processing and admin tasks)
  • max_execution_time = 120 (optional but often useful)
  • max_input_time = 120 (optional)

Important rules of thumb

  • post_max_size must be >= upload_max_filesize
  • Give yourself headroom. If you only set it to 20M and your next upload is 21M… you’re right back here.

How to apply the change

The right method depends on how PHP is managed on your server.

Option A: Plesk

If you’re using Plesk, you can usually set this per-domain:

  1. Domains → select your domain
  2. PHP Settings
  3. Set:
    • upload_max_filesize
    • post_max_size
    • memory_limit

Save, then retry the upload.

Option B: php.ini (or conf.d override)

If you manage PHP directly, edit the loaded php.ini (or a .ini file in conf.d) and set:

Then restart PHP-FPM (and reload Apache if needed). Examples:

Option C: .user.ini (common on shared hosting)

If you can’t edit global PHP config, you may be able to use a .user.ini file in the site’s document root (usually where wp-config.php lives):

Note: .user.ini changes can be cached for a few minutes depending on user_ini.cache_ttl.

Verify the fix

After updating limits, validate in one of these ways:

  • Retry the same upload in WordPress admin.
  • Check Tools → Site Health → Info for the current PHP limits.
  • Use a temporary phpinfo() page (remove it immediately after verifying).

Bonus: related WordPress memory settings

This issue is primarily a PHP POST size limit problem, but while you’re here it’s also reasonable to ensure WordPress has enough memory for admin actions. In wp-config.php you can add:

Wrap-up

When WordPress says “The link you followed has expired” during a theme/plugin upload, don’t stop at WordPress.

Check your logs.

If you see an error like:

  • POST Content-Length ... exceeds the limit of ...

…then the fix is to raise PHP’s post_max_size and upload_max_filesize, restart PHP-FPM, and re-run the upload.

Once those limits match your real-world upload sizes, the “expired link” mystery goes away for good.

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

Leave a Reply

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

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.