Are you seeing ‘The link you followed has expired’ error in WordPress?
This error does not give much clues about what’s actually wrong, which is why beginners find it a bit difficult to resolve.
In this article, we will show you how to easily fix ‘the link you have followed has expired’ error in WordPress. We will also talk about what causes this error and how to avoid it in the future.
What Causes The Link You Have Followed Has Expired Error?
This error usually occurs when you are trying to upload a WordPress theme or a plugin to your website from the WordPress admin area.
WordPress hosting companies have a setting which controls the size of files you can upload from inside the WordPress admin area. They also have a setting which stops scripts from running too long.
You can see the file size upload limit by visiting Media » Add New page.
These restrictions make your website safer and improves the overall performance of your WordPress hosting server.
If these settings are too low, or you are trying to upload a larger file, then you would see errors like memory exhausted error or maximum execution time exceeded error.
However, if you are trying to upload a WordPress theme or plugin, then you would see ‘The link you followed has expired’ error.
That being said, let’s take a look at how to easily fix this problem.
Fixing ‘The Link You Have Followed Has Expired’ Error
The quickest way to fix ‘The link you followed has expired’ error is by increasing the file upload size, PHP memory, and execution time limits for your website.
There are multiple ways to do that. We will show you all of them, and you can choose the one that looks easier or the one that works on your hosting environment.
Method 1. Increasing limits in functions.php file
This method is easier, but it has a downside. Your site will return back to the old limits if you change WordPress theme. If you are planning on changing your theme, then try one of the other two methods described below.
Simply add 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' );
You can increase the values in upload_max_size and post_max_size to be more than the file you are trying to upload.
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
If you don’t want to add code to your theme’s functions file, then you can try the .htaccess method.
For this method, you will need to edit the .htaccess file by using an FTP client or the File Manager app in cPanel.
Simply connect to your website using FTP and edit the .htaccess file.
Now, you need to add the following code at the bottom of your .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 save your changes and upload the file back to your website.
Method 3. Fix by increasing limits in php.ini file
The php.ini file is a configuration file used by PHP and WordPress. You’ need to connect to your WordPress site using an FTP client and look for php.ini file in your site’s root folder.
Most users are on a shared hosting account, so they may not find it in their site’s root folder. In that case, you need to create a blank php.ini file using a plain text editor like Notepad and upload it to your website.
Now edit the php.ini file and add the following code inside it.
upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300
Don’t forget to save your changes and upload the file back to your website.
You can now visit your website and try to upload the theme or plugin file. The error would disappear, and you should be able to upload the file.
If it doesn’t, then try to increase file limits to match the file size you are trying to upload.
We hope this article helped you easily fix ‘The link you followed has expired’ error in WordPress. You may also want to bookmark our guide on how to fix the most common WordPress errors. It will help you save a lot of time by quickly finding a fix for WordPress issues.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Bernard says
Very helpful thank you.
WPBeginner Support says
You’re welcome!
Admin
Ry says
Thank you!
Used .htaccess method.
WPBeginner Support says
You’re welcome, glad that our recommendations were able to assist!
Admin
Syed Nauman Sajid says
Brilliant and perfectly worked for me.
WPBeginner Support says
Glad our guide could help!
Admin
Bob says
People should check their settings. I left the M off from 128M. Really stupid but that was my issue.
WPBeginner Support says
Everyone can make a typo like that but we’re glad you were able to find and solve the issue for you
Admin
Art Bejarano says
I’m having an issue: I’ve added the htaccess text at the end and it did not work. I removed any formating on the text and it still did not work. I need help.
Ann says
I tried all the steps but I still have the issue. I have the issue every time I click on save/submit. For example, update WordPress version. Enable debug mode in Elementor. Disable all plugins.
Please help to let me know how can I fix it, please.
Anurodh Keshari says
In my dashboard Maximum upload file size is 512 MB. but still, I’m facing this issue but I’m facing this issue while deactivating the plugin… can you help me…
WPBeginner Support says
You would want to check with your hosting provider to ensure they are not overriding any of your changes.
Admin
Cesar Puente says
This guide helped me a lot. I had this problem with local WordPress. I couldn’t upload my customize theme to test it.
Thank you so much.
WPBeginner Support says
Glad our recommendations were able to help
Admin
Akin says
Method 2 worked for me like charm. Thank so much for this.
WPBeginner Support says
Glad our recommendation helped you
Admin
Carly says
Worked perfectly – thanks so much!
WPBeginner Support says
Glad our guide was helpful
Admin
Tasmim says
Really good suggestion. works really fine now
WPBeginner Support says
Glad our recommendation helped
Admin
elijah says
which location should i post the method one which line
WPBeginner Support says
We would recommend taking a look at our guide below for understanding how to paste snippets:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/
Admin
Tudor says
It worked, thank you!
WPBeginner Support says
Glad our guide was helpful
Admin
Andri says
Thanks very much Method 3 worked.
But, Server error when I edit the .htaccess file and Adding to functions.php doesnt work.
WPBeginner Support says
Glad our guide was helpful, if any of the methods don’t work then we would recommend checking with your host as those are settings that may be getting ignored due to server settings.
Admin
Rush says
Thanks for help!
WPBeginner Support says
You’re welcome
Admin
Khan says
METHOD 2 worked perfectly.
I was trying to install the elegant theme
Thanks Brother!
WPBeginner Support says
Glad our guide could help
Admin
Theo says
Thank you, that was most helpful. I modified .htaccess.
WPBeginner Support says
Glad our guide was able to help
Admin
Nathan says
I get a 500 Internal Server error when I edit the .htaccess file. How do I add the code without getting this error. Adding to functions.php doesnt work for me
WPBeginner Support says
Some workarounds for that specific error message can be found in our article below:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/
Admin
Ravi says
Many thanks, your method 2 worked for me on 04-JULY-2020. I have added following code before the tag:
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300
WPBeginner Support says
Glad our recommendation was helpful
Admin
James Voufo Safor says
Thank you so much. This really worked!
I followed the second method and now I have the theme installed.
Keep doing what you do.
WPBeginner Support says
Glad our guide could help
Admin
kwaku Vesper says
thanks very much it worked
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
Waqar says
Did all these methods but still getting the error
Don’t know what else to do
WPBeginner Support says
You may want to reach out to your hosting provider to ensure they’re not overriding the changed you’re making and that they don’t see any errors from their end.
Admin
Steve says
Sadly this explanation does not indicate in which folder the php.ini should be located/placed
WPBeginner Support says
Apologies if our explanation was not clear, the php.ini should be in your site’s root folder.
Admin
Mark Ferguson says
I have a client having this issue but only on the woocommerce login form. If you click link to try again it works. Any ideas?
WPBeginner Support says
If the methods in this article and resaving your permalinks does not fix the issue, you would want to reach out to WooCommerce for assistance.
Admin