Fix the “The link you followed has expired” Error in 3 easy steps
Often times you might find yourselves confronted with the “The link you followed has expired” error on your WordPress website and are left clueless as to what does this WordPress error means? What did I do wrong during the process?
In this article, we will deploy the best solutions on how to fix this error, because it does not provide much information on what the problem might be. So if you are seeing this message while uploading a WordPress theme or plugin, it simply means the size of the file is larger than your WordPress website is allowed.
Before we get into the details and solutions on how to fix The link you followed has expired error, let’s first get familiarized with the issue and what might occur.
What Causes The link you followed has expired Error to Appear
This error usually occurs when you are trying to upload a WordPress theme or plugin. WordPress has a fixed size upload limit which interferes when larger files are being uploaded.
Besides the size upload limit, WordPress has an upload time limit, this means when files take too long to upload and exceed that limit, the link you followed has expired error will instantly show.
To see the file size upload limit simply navigate to your WordPress Dashboard > Upload > Add New. Right under the Drop Files Here field where you can upload files on your WordPress website, you will find all the necessary details on your file size limit and file upload limit. In order to fix the link, you followed has expired error you will need to increase the file upload size, PHP memory, and execution time limits for your website.
Website hosting providers have the settings to control these limits and they are set for a reason to protect and keep your website safe as well as provide better performance for your site. Depending n what hosting you use, because managed hosting providers will have the maximum upload size to 100 MB, while shared hosting providers will provide a smaller size upload.
Even when your website has a larger file size upload limit, if your website’s maximum execution time is limited, it might cause the link you followed has expired error to appear due to the fact that larger files will take more time to load and your site’s maximum execution time is limited then it will fail to upload the file.
How to fix The Link you Followed has Expired Error
Now that we have the basics clear on what is “the link you have followed has expired” error, we will elaborate further on how to fix the issue. As we said this error will occur once you try to upload a WordPress theme or plugin that exceeds the limit of file upload size, PHP memory, and execution time limits for your website.
To fix this issue we will need to increase the values in upload_max_size and post_max_size to be more than the file you are trying to upload to your WordPress website. There are a few methods you can try, and each will require editing a core WordPress file and copying and pasting a few lines of code. But we will walk you through every step of the way.
Note that before you continue with resolving the issue and editing core files on your website we strongly advise you to take a full backup of your website. Also remember not to try out all these methods at once, if one fails to do the job make sure you revise all the changes you’ve made before proceeding with the next method.
Increase the limits on your functions.php file
This is the easiest ou of the three for that reason we decided to present it first. All you need to do is access the functions.php file from WordPress Dashboard > Appearance > Editor. On the right, you will find Theme Functions (functions.php). It is preferred you rite the code on your child theme for safety reasons.
Simply add the following code on the functions.php file and make sure the value you put supports the size of the file you are uploading and make sure the execution time is long enough for the file to be uploaded.
@ini_set( 'upload_max_size' , '100M' ); @ini_set( 'post_max_size', '100M'); @ini_set( 'max_execution_time', '300' );
Increasing the values of your functions.php file is the easiest approach but note that this file is connected to your current WordPress theme and on the occasion that you change the theme the values will be brought back to as they were.
Increase the limits on your .htaccess file
The second approach requires you to edit the .htacces file which is a core file used by WordPress, thus we will need to make changes to this file and copy our code to change the default values limited by WordPress.
To edit this file you will need to gain access to your server using an FTP client or via the File Manager app in cPanel. Login to the cPanel using your credentials. Next, you will need to locate the File Manager app.
Once you click on that you will be prompted to as to where you want to navigate. Make sure you choose to open the public.html folder.
Once you are on the public.html folder here you will locate the .htaccess file, right-click on the file and choose Edit. From there you will need to copy and paste the following code at the end of the .htaccess file.
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
Once you are done click on Save and that should work. This method usually does the trick by fixing the link you followed has expired error and allowing you to upload the preferred file.
In that case, we still have one more trick under our sleeves. We will go with the third method, just make sure you undo all the changes you’ve made to the .htaccess file if the said approach dod not work.
Create a PHP.ini file
The PH.ini file is a configuration file used by WordPress and PHP. To access it you will need to connect your WordPress website using an FTP client and find the file on your website’s root folder.
But if you can not find the file, as many websites on shared hosting might not find it on the site’s root folder, in such case you should create one locally on your computer and then upload it on your server.
To do that simply open a blank notepad or any preferred plain text editor and paste it the following code into it.
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
Next, you will need to save the file on your computer. Name the file php.ini and under Save as Type option choose All Files.
Now you will need to upload the php.ini file you create on your server. To do that open the public.html file. There you will need t upload the php.ini file you’ve just created. This shall eliminate the error and allow you to upload the files.
We have concluded our article on how to fix the link you followed has expired error and provided you with all the possible solutions on how to solve the issue. The mentioned methods and approaches should be able o help you upload the preferred WordPress themes and plugins.
In any case that none of these methods work, make sure to contact your hosting provider and ask them to help you along the way as many shared hosting providers wl have restrictions that prevent you from uploading large files.