You might have seen the ‘the link you followed has expired’ error in WordPress. It is one of the common errors, that WordPress beginners face and find it difficult to resolve.
When you are uploading a theme or a plugin to your WordPress site, then this error occurs due to file size, exceeding the size that is currently set in WordPress OR it exceeds the execution limit.
In this article, we will see How to easily fix the “the link you followed has expired” error in WordPress.
We will also see that How to avoid this error in the future.
So, let’s dive into it.
What causes the “the link you followed has expired” Error?
Usually, this error occurs when you are trying to upload a theme or a plugin from your WordPress Admin area.
The size of files you can upload from within the WordPress admin area is controlled by an option on most WordPress hosting companies. They also include a setting that prevents scripts from executing for an excessive amount of time.
Visit the Media » Add New page to check the file size upload restriction.
The prefixed sizes vary according to the web hosting plan you pick.
While managed WordPress hosting providers establish a maximum upload size limit of above 100MB, lesser shared hosting plans may only allow for 25MB.
This restriction frequently prevents you from installing large themes and plugins.
If your website’s maximum execution time is limited, even if it has a wider upload size limit, WordPress will frequently fail to upload larger files.
This is where you’ll run into fatal errors and other troubles, such as the “link you followed has expired” error.
If you want you can pick one from Bluehost Hosting and Hostgator Hosting.
You may also want to check out the Review of Bluehost.
Fixing the ‘the link you followed has expired’ Error
The easy and fast way to fix the ‘the link you followed has expired’ error is by increasing the max upload size, PHP memory, and execution time limits for your website.
For fixing the ‘the link you followed has expired’ error you need to edit the core files of WordPress and copying and pasting a few lines of code.
It can be done in a variety of ways. We’ll take you to step by step through the procedure.
Remember not to use all of these techniques at the same time. If one technique doesn’t work, undo the modifications you’ve made and attempt the next. Not all at once, please!
Note: Back up your website and make copies of files before making any changes to the core WordPress files.
Method 1: Increasing limits in functions.php file
This is the easiest method to follow for fixing the ‘the link you followed has expired’ error in WordPress.
But, if you are planning to switch to a new WordPress theme then you can skip this method and continue with the other ones
In this method, we will edit the functions.php file of the active WordPress theme.
Go to your WordPress dashboard and click the Appearance » Theme Editor
On the right side of the screen, you will see the files of the theme that is currently active. Select functions.php file.
Now just copy the following code and paste it at the end of the functions.php file.
@ini_set( 'upload_max_size' , '120M' ); @ini_set( 'post_max_size', '120M'); @ini_set( 'max_execution_time', '300' );
You can change the upload_max_size and post_max_size according to your choice or the file you are uploading.
You will also need to increase the max_execution_time to the time you think it would take for the file to upload. If you are unsure, then you can try doubling this value.
Method 2: Fix by increasing limits in .htaccess file
The 2nd method to fix the ‘the link you followed has expired’ is by increasing the limits in the .htaccess file.
This method could be a bit technical for beginners but if you follow the process, you can easily make it.
You can access it by 2 methods, the first method is Cpanel and the other method is by using FTP.
If you don’t have access to your Cpanel then you can stick to the 2nd method which is by using FTP software like FileZilla.
You would need your FTP credentials to connect with your site. Once you are connected locate your .htaccess file and right-click on it to edit.
And if you have access to your Cpanel then log in to it and look for File Manager and open it.
Now look for the .htaccess file, it is usually in the root directory of your site not in the WordPress directory and right-click to edit it.
Now, just copy the following code and paste it at the bottom of the .htaccess 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
Don’t forget to click ‘Save Changes’ once you have pasted the code.
Method 3: Fix by increasing limits in php.ini file
The php.ini file is a PHP and WordPress configuration file. To fix the ‘the link you followed has expired’ error You’ll need to use FTP software to connect to your WordPress site as I explained above, and look for the php.ini file in the root folder.
As most users have a shared hosting account(which has Cpanel access), they may not be able to find it in the root folder of their website.
In such a scenario, you’ll need to use a plain text editor like Notepad to generate a blank php.ini file and upload it to your website and click on the ‘Save Changes’.
upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300
Now, you can visit your dashboard and try to upload a theme or a file. The error should be gone and you should be able to upload the file.
If you still seeing the error then try to increase the file limits to match the file size you are uploading.
If you have any queries please comment them down and I’ll love to reply.
I hope this article helped you in fixing the ‘the link you followed has expired’ error in WordPress. If you liked this article, please make sure to subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter, Facebook, and Instagram.