How to Fix the Link You Followed Has Expired Error in WordPress
‘The link you followed has expired’ error is a tough one to deal with. This is mostly because it doesn’t give a lot of clues on what might have gone wrong. For a beginner it can be very hard to fix this error. In this post we will be taking a look at the steps you need to take to fix this error.
What causes it?
The first step to fixing the link you followed has expired error is to understand what causes it. The error normally occurs when you try to upload a theme or plugin to your WordPress admin area. WordPress hosting companies have controls that limit the size of file you can upload to the WordPress admin area. They also have settings that keep scripts from running for long. To find the file upload limit go to Media>>Add New page.
The restrictions are a good thing since they make your site safer and also improve its performance. All in all the limits are too low. Trying to upload a larger file will trigger errors like maximum execution time exceeded error and the memory exhausted error. If you want to upload a plugin or theme to WordPress you will get ‘The link you followed has expired’ error. Here is how you can fix it.
Fixing the error
The fastest way to fix this error is by increasing the file upload size, execution time limits and PHP memory for your WordPress website. You can do this in several ways.
Increase limit in functions.php file
Although this method is easy it will take your website to the old limits if you change the theme. You can add the following code to your functions.php file to change the limits.
@ini_set( ‘upload_max_size’ , ‘120M’ );
@ini_set( ‘post_max_size’, ‘120M’);
@ini_set( ‘max_execution_time’, ‘300’ );
Increase the values in upload_max_size and on post_max_size to increase limits. You must also increase the value under max_execution_time so as to allow more time for the files to upload. Start by doubling these values.
Increase limits in .htaccess file
This is the second method you can use to fix ‘The link you followed has expired’ error. You can edit the .htaccess file using FTP client or File Manager app in cPanel. Add the following code to 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
Increase the values accordingly and don’t forget to save the changes afterwards.
Increase limits in pho.ini file
Php.ini file is the configuration file that is used by PHP and WordPress. Start by connecting to your site using FTP client and search for the php.ini file I the root folder of your website. If you can’t find it because you are using shared hosting you need to create a bank php.ini file with a plain text editor and upload it. In the blank php.ini file you need to add the following code
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
You can then edit the values to match the file that you want to upload. Doubling the values should be the first thing you try.