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):
|
1 2 |
[proxy_fcgi:error] AH01071: Got error 'PHP message: PHP Warning: PHP Request Startup: POST Content-Length of 20303882 bytes exceeds the limit of 8388608 bytes in Unknown on line 0' |
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 = 64Mpost_max_size = 64Mmemory_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_sizemust 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:
- Domains → select your domain
- PHP Settings
- Set:
upload_max_filesizepost_max_sizememory_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:
|
1 2 3 4 5 6 |
upload_max_filesize = 64M post_max_size = 64M memory_limit = 256M max_execution_time = 120 max_input_time = 120 |
Then restart PHP-FPM (and reload Apache if needed). Examples:
|
1 2 3 4 5 6 7 8 9 10 |
# Restart PHP-FPM (service name varies by distro/version) systemctl restart php-fpm # or systemctl restart php8.2-fpm # Reload Apache systemctl reload apache2 # or systemctl reload httpd |
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):
|
1 2 3 4 5 6 |
upload_max_filesize=64M post_max_size=64M memory_limit=256M max_execution_time=120 max_input_time=120 |
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:
|
1 2 3 |
define('WP_MEMORY_LIMIT', '256M'); define('WP_MAX_MEMORY_LIMIT', '256M'); |
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.




