Are you getting the 'The link you followed has expired' error in WordPress when you are trying to do something on your site, such as uploading a file, theme or plugin?
This warning or error does not have many details as to what is wrong, which makes it impossible for beginners to fix.
In this post, we will explain how to easily solve the ‘the link you have followed has expired' error on your WordPress site. We'll even go into what triggers this problem and how to prevent it in the future.
What Is the Root Cause of The Link You Followed Has Expired Error?
This error typically happens when you attempt to upload a WordPress theme or plugin to your website via the WordPress admin dashboard.
Most WordPress hosting providers have a configuration that limits the size of files you may upload in the WordPress admin. They also have a setting that prevents scripts from running for too long, thus eating up precious server resources.
These limitations are there to secure your website and boost the overall performance of any WordPress hosting server.
If these options are set too low, or if you attempt to transfer a larger file, you will generate errors such as memory exhausted or maximum execution time exceeded.
On the other hand, if you attempting to upload a WordPress theme or plugin, you will get the ‘The link you followed has expired' warning.
So, let's take a good look at how we can effectively solve this problem.
How to Fix 'The Link You Followed Has Expired' Error
The easiest way to fix ‘The link you followed has expired' error is to increase your website's file upload configuration, the PHP memory limit, and execution time limits of the server.
There are several methods to do this.
We'll show you all of the options, and you can choose the one that seems to be the simplest or the one that best fits your hosting setup.
1. Increasing the number of limits using the WordPress functions.php file
This approach is simplest, but it has a disadvantage. If you change your WordPress theme, your page will revert to its previous limitations, possibly triggering the error again. If you want to change your WordPress theme in the future, or have a method that is future proof, you may try one of the other two fixes mentioned below.
Simply copy and paste the following code into the functions.php file of your WordPress theme.
@ini_set('upload max size','500M' );
@ini_set('max_execution_time,' 300 );
You may want to change the values in upload_max_size and post_max_size to be just slightly larger than the size of the file you are trying to upload.
The value is in Megabytes, for example, above we set our limit to be 500M or 500 Megabytes.
You will also need to raise the max execution time to the time you expect the file will take to upload. If you're not sure, consider doubling this value. If you have a slow upload connection, you might want to make it larger.
The value is in seconds, so 300 seconds is 5 minutes (60 x 5).
2. Increase the limits in the .htaccess file
You can use the.htaccess method if you don't want to make changes to your theme's functions file, or if you know that your WordPress theme could change soon.
To use this route, you must edit the .htaccess file with an FTP client or the File Manager program in cPanel, or a WordPress File Manager plugin.
Simply use FTP (or another method) to access to your website root folder and update the .htaccess file with the following values.
Put the values at the bottom of your .htaccess file.
php_value upload_max_filesize 500M
php_value post_max_size 500M
php_value max_execution_time 300
php_value max_input_time 300
Remember to save the modifications you made and re-upload the file to your website.
3. Increase the limits in the php.ini file
The php.ini file is a PHP and WordPress configuration file. Once again, you need to connect to your WordPress hosting account using an FTP client, or your preferred manager of accessing files on your server and search for the php.ini file in the root folder.
Because most people are on shared hosting, you will possibly not find this file in the site's root folder. In that case, use a plain text editor like Notepad, or any other simple text editor to generate a new php.ini file and add it to your website's root folder.
Now, open the php.ini file and enter the following code.
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
Remember to save the changes and re-upload the file to your website, if you used FTP, or double-check that the settings have been saved.
You can now try to import the theme or plugin file to your website, again. The problem should be gone now, and you should be able to upload the file without any problem.
If it still doesn't work, consider increasing the file limits to match the file size you're attempting to upload, or else open a case with the support department of your hosting server.
Do you want a fast website?
Who am I kidding? Don't we all?
So why do so many of us struggle?
The biggest challenge is usually finding a fast, reliable hosting company.
We've all been through the nightmares - support take takes forever or doesn't resolve our problem always blaming something on your side...
But the biggest bummer is that the website always feels slow.
At CollectiveRay we host with InMotion hosting and our website is stupid fast. We run on a custom stack of LightSpeed server setup on MariaDB with a PHP7.4 engine and fronted through Cloudflare.
Combined with our front-end optimizations we reliably server 6000 users every single day, with peaks of 50+ simultaneous users.
Want to get a fast setup like ours? Transfer your site for free to InMotion hosting and get our 50% OFF on current pricing.
We hope this post was useful in resolving the ‘The link you followed has expired' error in WordPress. You should also check our guide on how to fix the most common WordPress errors. There are plenty of easy fixes to common WordPress problems.
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!
Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.