Is WordPress telling you: “The link you followed has expired.” ?
Beginners are put off by this error because it does not tell them much about what is actually wrong.
No worries, this is a common WordPress error that appears when attempting to upload themes and plugins through WordPress’ dashboard.
The purpose of this article is to show you how to fix the ‘the link you followed has expired.’ error in WordPress. I’ll also explain you what causes this error and how to prevent it in the future.
Quickly troubleshooting the Link you followed has expired error
Fixing the “link you followed has expired” error is easy. All you need to do is to increase the maximum upload size and execution times for your website. In order to do this, you’ll have to edit a core WordPress file and copy a few lines of code.
Understanding the “The Link You Followed Has Expired” Error
This message is displayed when you’re trying to upload themes, plugins, or even large media files via the WordPress dashboard.
It’s basically WordPress’ way of telling you that you’ve exceeded some sort of limit set by your hosting server. These limits could be related to the maximum upload size, PHP execution time, or PHP memory limit.
While these restrictions are in place to keep your server running smoothly and securely, they can sometimes interfere with your usual WordPress activities.
Why Does ‘The Link You Followed Has Expired’ Error Occur?
When you go to the WordPress dashboard and click ” Media “, then “Add New”, you’ll find there’s a limit to the upload size.
Depending on the web-hosting plan you use, you’ll get some types of prefixed maximum upload file sizes.
While managed WordPress hosting might give you the freedom to upload files larger than 100 MB, shared hosting plans often cap it at 25 MB or even lower.
These constraints exist to ensure server stability, prevent misuse, and optimize resource allocation among all hosted websites. Often, it’s these limitations that trigger the error in question.
Ready to boost your productivity, impress your clients and grow your WordPress agency?
Fixing “The Link You Have Followed Has Expired.” Error
Although the error message may seem perplexing at first, solutions do exist, and they involve tweaking a few server settings. The objective is to adjust the PHP memory limits and maximum file upload sizes to accommodate your needs.
There are 3 ways of doing that, each with its own set of pros and cons. The choice of method should be guided by your hosting environment and technical comfort level.
Method 1: Increasing Limits in functions.php File
This method is simpler, but there is one negative side effect. If you change your theme, your website will return back to the limits it had before.
Consider using one of the other two methods listed below if you plan on changing your theme.
Include the following code to your WordPress theme’s functions.php file:
@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );
The upload/post/max_size parameters should be increased to match the file you are trying to upload.
Increase the file’s max_execution_time to the amount of time you think the upload will take.
Feel free to double this value if uncertain.
Method 2: Increasing Limits in .htaccess File
The .htaccess file in WordPress is used to control how Apache (the server) serves files that are located in the root directory, and subdirectories.
You can edit the .htaccess file to increase PHP memory limits and troubleshoot the “Link You Have Followed Has Expired” Error.
You can edit the .htaccess file by connecting to your website via FTP.
Download it, open it, and add the following code at the end of file.
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
Make sure you save your changes before uploading the file back to your website.
Method 3: Increasing Limits in php.ini File
Locating the .htaccess file is not always straightforward. That’s why i’ll propose you a third way to fix the “Link You Followed Has Expired” Error in WordPress: the php.ini file.
If you want to avoid that entirely, and also not use the functions.php method, there is still another option: the php.ini file.
But be aware that if you have a shared hosting plan, you may not have the php.ini file, or it might not be editable by you.
When that happens, you may want to try creating a blank php.ini file in the root directory of your website.
Put the following lines of code in the php.ini file once you have located/created the file:
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300
Your error should be resolved after you save the changes and upload back the php.ini file!
Navigating and resolving the “The link you followed has expired” error doesn’t have to be a nightmare. This guide is here to help you solve the problem once and for all, so you can get back to managing your WordPress site without these annoying interruptions.