Have you encountered the link expired WordPress error while trying to upload a theme or plugin? You navigate to Plugins > Add New, select your zip file, and wait for the upload bar to finish. Suddenly, instead of a success message, the screen turns white and displays a frustratingly vague message: “The link you followed has expired.”
This is one of the most confusing errors in the ecosystem. Unlike a “404 Error” or “Database Connection Error,” this message tells you nothing about the actual problem. You didn’t follow a link; you tried to upload a file. Why is the system talking about expired links?
If you are searching for a reliable solution, you have come to the right place. In this guide, we will fix this upload issue using proven server configuration methods.
🚀 Need this fixed instantly? If you feel uncomfortable editing server code files like
.htaccessorphp.ini, Click here to order our Quick Fix Service. We will resolve this WordPress upload error and optimize your server configuration within one hour.
In this extensive guide, we will cover 4 proven methods to override these limits using code, ensuring your site stays fast, stable, and error-free.
[Image: link-expired-wordpress-error-fix.jpg] Alt Text: Computer screen displaying the link expired WordPress error during a plugin upload.
Causes of the Link Expired WordPress Error
To understand the solution, you must understand why this error happens.
WordPress runs on PHP, a server-side programming language. PHP has strict limits set by your hosting provider to ensure one website doesn’t hog all the server’s resources. When you try to upload a theme file (which might be 10MB) but your server has a upload limit of 2MB, the server rejects the file.
However, instead of saying “File too large,” WordPress attempts to verify the “Nonce” (a security token). Because the upload failed silently in the background due to size limits, the security check fails. Consequently, WordPress assumes you are trying to perform an unauthorized action or that your session timed out.
Common Triggers:
Low Upload Size Limit:
upload_max_filesizeis too small.Low POST Size Limit:
post_max_sizeis smaller than the file.Short Execution Time: The server times out before the upload finishes.
We will manipulate these three settings in the following methods.
Method 1: Fix Link Expired WordPress Error via Functions File
If you are looking for the easiest way to solve this problem, start here. You can try adding instructions directly to your WordPress theme. While not as robust as the server-level methods, it often works for minor adjustments.
This approach utilizes the functions.php file found in your theme folder.
Step 1: Access Theme File Editor
Log in to your WordPress Dashboard. Navigate to Appearance > Theme File Editor.
Step 2: Locate functions.php
On the right-hand sidebar, find the file labeled Theme Functions (functions.php). Click to open it.
Step 3: Insert Code to Fix the Error
Scroll to the top of the file. Paste the following code just below the opening <?php tag:
@ini_set( 'upload_max_filesize' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'max_execution_time', '300' );
Step 4: Update File
Click Update File. Attempt your upload again.
Warning: If you update your theme in the future, these changes will be overwritten. Therefore, check out our [WordPress Maintenance Services] to keep your site optimized permanently.
Method 2: Solve Link Expired WordPress Error with .htaccess
For most websites running on shared hosting (like Bluehost or SiteGround), the .htaccess file controls server behavior. This hidden file sits in your website’s root directory and offers the most reliable way to apply a fix for this warning.
This method works for servers running on Apache web server software.
Step 1: Connect to Your Server
First, you need to access your files. You can use a free FTP client like FileZilla or the File Manager inside your hosting cPanel.
Step 2: Locate the .htaccess File
Next, navigate to the public_html folder. Look for a file named .htaccess.
Note: If you cannot see it, look for a “Settings” gear icon in your File Manager and ensure “Show Hidden Files” is checked.
Step 3: Edit Code for the Upload Fix
Now, right-click the file and select Edit. Scroll to the very bottom of the file (after the line # END WordPress) and paste the following code snippets:
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
Step 4: Save and Test
Finally, save the changes. Go back to your WordPress Dashboard and try uploading your plugin or theme again.
If the upload works, you have successfully resolved the issue.

Method 3: Fix Link Expired WordPress Error using php.ini
If the .htaccess method did not work, you must use the php.ini file. This is the default configuration file for PHP settings. This is often the cleanest way to fix the issue without risking site errors.
Step 1: Find the php.ini File
Connect via FTP or File Manager. Look in your public_html folder for a file named php.ini.
Note: On some shared hosting plans, this file might not exist. If it is missing, simply create a new file, name it
php.ini, and upload it to your root folder.
Step 2: Add Config to Fix the Expiration Error
Open the file for editing. Paste the following lines of code. If the file already has code, simply modify the existing values:
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
Step 3: Save and Verify
Save the file. On some hosts, you might need to “Kill PHP Processes” in cPanel for the changes to take effect immediately. Once done, try your upload again.

Method 4: Update PHP to Fix Link Expired WordPress Error
Sometimes, the error is not about size limits, but about an outdated PHP version causing conflicts with the “Nonce” security check.
If you are running an old version of PHP (like 7.4 or older), WordPress might struggle to verify your session, leading to the “expired” message.
How to Check and Update:
Log in to your Hosting Control Panel (cPanel).
Look for MultiPHP Manager or PHP Version Selector.
Check which version your domain is using.
If it is below 8.0, select PHP 8.1 or 8.2 and apply the changes.
Updating PHP not only fixes this error but also improves your site speed and security. For more details on PHP versions, check the official documentation at PHP.net.
Checking Your Success
After applying any of these methods, you need to verify that the link expired WordPress error is truly gone.
Go to Dashboard: Log in to WordPress.
Navigate to Media: Click Media > Add New.
Check Limits: Look at the bottom for the text “Maximum upload file size.” If it says 128MB (or what you set), the server is configured correctly.
Retest Upload: Try uploading the zip file that caused the error originally.

Conclusion on the Link Expired WordPress Error
The “Link you followed has expired” warning is annoying because the message is misleading. It sounds like a broken link, but it is actually a resource roadblock.
By increasing your upload_max_filesize, post_max_size, and max_execution_time, you give your server the breathing room it needs to process large files.
Summary of Fixes:
Functions.php: Good for temporary quick fixes.
.htaccess: Best for Apache/Shared Hosting.
php.ini: Best for VPS/Custom configs.
PHP Version: Essential for modern security.
Still Stuck? If you tried all these methods and still see the error, you might have a plugin conflict or a deeper server issue. 👉 Contact Us Here for a professional audit, or Order our Emergency Fix Service to get your site working perfectly today.