
Short answer
"The link you followed has expired" usually means your upload is bigger than PHP allows or took too long. Check the limits in Tools > Site Health > Info, then raise upload_max_filesize, post_max_size and max_execution_time in your hosting panel or a .user.ini file. If they are locked, upload by SFTP instead.
What does "The link you followed has expired" actually mean?
This message almost always means the file you tried to upload was larger than your server allows, or the upload took longer than PHP was permitted to run. WordPress shows a vague message because the request is cut off by PHP before WordPress can explain what went wrong.
You will usually see it when uploading a theme zip, a large plugin, a page builder template kit or a big image or video through the Media Library. Small uploads work fine, which is a useful clue: if a tiny file uploads and a big one fails, you are looking at a limit, not a broken site.
Three PHP settings are normally involved:
- upload_max_filesize: the largest single file PHP will accept.
- post_max_size: the largest whole request, which must be at least as big as upload_max_filesize.
- max_execution_time: how many seconds a script can run before PHP stops it.
A fourth, memory_limit, can also play a part with very large uploads or image processing.
How do you check your current upload limit?
Before changing anything, find out what your limits are now so you know whether a change has worked. WordPress tells you in two places.
- Go to Media > Add New Media File. Under the upload box you will see "Maximum upload file size" followed by a value such as 2 MB or 64 MB.
- Go to Tools > Site Health > Info and open the Server section. Here you will find the PHP version, the maximum upload size, post max size, max execution time and memory limit.
Write these down. If your theme zip is 30 MB and the limit says 8 MB, you have found the cause.
Fix 1: raise the limits in your hosting control panel
The cleanest fix is to change the PHP settings where your host intends you to change them, which is usually the control panel. Most UK shared and managed hosts give you a PHP settings screen.
- cPanel: look for "Select PHP Version" then "Options", or "MultiPHP INI Editor". Pick your domain and edit the values.
- Plesk: open the domain, then "PHP Settings", and adjust the values in the performance and common settings.
- Managed WordPress hosts: some have a simple setting in their dashboard; others ask you to raise a support ticket.
Sensible values for a typical small business site are an upload_max_filesize of 64M, a post_max_size of 64M or a little more, a max_execution_time of 300 and a memory_limit of 256M. You rarely need more than that, and setting huge values just hides problems.
Save, then go back to Site Health and check the new values have taken effect. Some hosts take a minute to apply changes.
Fix 2: set the values with .htaccess, php.ini or .user.ini
If your host has no settings screen, you can often set the limits in a file, but which file works depends on how PHP runs on your server. Try one method at a time and check Site Health after each.
.htaccess (Apache with mod_php only)
Add these lines near the top of the .htaccess file in your WordPress root:
php_value upload_max_filesize 64Mphp_value post_max_size 64Mphp_value max_execution_time 300
If you get a 500 Internal Server Error straight away, your server does not run PHP as an Apache module. Remove the lines immediately and try the next option.
.user.ini or php.ini
On servers running PHP-FPM or FastCGI, create a file called .user.ini (or php.ini, depending on the host) in the WordPress root containing:
upload_max_filesize = 64Mpost_max_size = 64Mmax_execution_time = 300
PHP caches .user.ini files, so changes can take a few minutes to show. Be patient before deciding it has not worked.
What about wp-config.php?
You will see advice to add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php. That can raise WordPress's memory allowance, but it does not change the upload size or execution time, so on its own it will not cure this error.
What if your host will not let you change the limits?
If the limits are locked, you can usually get the file onto the server another way rather than fighting the setting.
- Themes and plugins: unzip them on your computer and upload the folder by SFTP into
wp-content/themesorwp-content/plugins, then activate from the dashboard. - Large media: upload by SFTP into the uploads folder, then use a plugin that registers existing files in the Media Library, or simply host big videos on a video platform and embed them.
- Images: resize before uploading. A photo straight off a phone is often far bigger than any web page needs. Exporting at around 2000 pixels on the long edge is plenty for most layouts.
- Ask your host: support teams can often raise limits for you even when the panel cannot.
Common mistakes when fixing this error
Most failed fixes come down to a handful of avoidable slips.
- Raising upload_max_filesize but not post_max_size. If post_max_size is smaller, the upload still fails.
- Editing the wrong file. Make sure you are in the folder that contains wp-config.php, not a parent folder or a different site on the same account.
- Not checking the result. Always confirm in Site Health. If the number has not changed, your edit has not been read.
- Leaving broken .htaccess lines in place. A 500 error after editing .htaccess means remove what you added.
- Uploading the wrong zip. Many theme downloads contain documentation and the theme zip inside another zip. Uploading the outer package can fail or produce a different error.
Before editing server files, take a backup or at least download a copy of the file you are changing so you can put it back in seconds.
Could something else be causing it?
Occasionally the limits look fine and the error still appears, which points to something else interrupting the request. Things worth checking are a security plugin or web application firewall blocking large requests, a CDN or proxy with its own upload size cap, and a slow connection causing a long upload to time out. Temporarily disabling a security plugin, or uploading from a faster connection, will tell you quickly whether either is involved.
If you want to understand the server side of WordPress properly, rather than copying settings from forums, the Elementor Intermediate course covers working confidently with hosting, files and site settings. For keeping a site healthy month to month, my monthly WordPress maintenance checklist includes checking these server values. The official WordPress advanced administration handbook is also worth bookmarking.
Key takeaways
- The error is almost always a PHP upload size or time limit, not a broken site.
- Check current values in Site Health before and after any change.
- post_max_size must be at least as large as upload_max_filesize.
- Change limits in your hosting panel first; files like .user.ini are the fallback.
- If limits are locked, upload themes and plugins by SFTP.
Questions people ask
Is this error a sign my site has been hacked?
No. It is a generic message WordPress shows when an upload request is cut off, usually by PHP limits. It is not a security warning.
What upload limit should a small business site have?
Around 64 MB covers almost every theme, plugin and image upload. Very large videos are better hosted on a video platform and embedded.
Why did adding lines to .htaccess give me a 500 error?
Your server does not run PHP as an Apache module, so it does not understand php_value lines. Remove them and use your hosting panel or a .user.ini file instead.
Does WP_MEMORY_LIMIT fix upload errors?
Not on its own. It controls WordPress memory, not upload size or execution time, which are the usual causes of this error.


