Are you seeing ‘The link you followed has expired’ in WordPress?
This error does not give many clues about what’s wrong, which is why beginners find it difficult to resolve.
In this article, we will show you how to easily fix ‘the link you followed has expired’ 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.
You will see a message saying, ‘The link you followed has expired. Please try again’.
WordPress hosting companies have a setting that controls the size of files you can upload inside the WordPress admin area. They also have a setting that stops scripts from running too long.
You can see the file size upload limit by visiting the Media » Add New page.
These restrictions make your website safer and improve the overall performance of your WordPress hosting server.
However, if you are trying to upload a WordPress theme or plugin, then you will see ‘The link you followed has expired’.
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’ is by increasing the file upload size, PHP memory, and execution time limits for your WordPress website.
There are multiple ways to do that. We will show you all of them, and you can choose the one that looks easier and works in your hosting environment.
You can use the quick links below to jump to the method you want to use.
Method 1: Increasing Limits Using WPCode (Recommended)
Increasing limits in the functions.php file can be easy, but this method has a downside. Your site will return back to the old limits if you change or update your WordPress theme.
That’s why we recommend using WPCode instead.
WPCode is the best code manager plugin for WordPress that allows you to add code snippets anywhere on your website without editing theme files like functions.php. That way, any customizations you make won’t be lost when you update or change your theme.
First, you will need to install and activate WPCode. For more details, please see our beginner’s guide on how to install a WordPress plugin.
Once the plugin has been activated, simply go to Code Snippets » Add Snippet and click on ‘Add Your Custom Code.
Make sure to select ‘PHP snippet’ from the ‘Code Type’ dropdown menu, and then enter this code into the ‘Code Preview’ box.
@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.
Finally, you will need to toggle on the code snippet to make it active on your website. For more details, please see our guide on how to easily add custom code in WordPress.
Method 2: Increasing Limits in the .htaccess File
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 post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300
Finally, don’t forget to save your changes and upload the file back to your website.
Method 3: Increasing Limits in the php.ini File
The php.ini file is a configuration file used by PHP and WordPress. You will need to connect to your WordPress site using an FTP client and look for the php.ini file in your site’s root folder.
Most users are on a shared hosting account, so they may not find this file in their site’s root folder. In that case, you will 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 again. The error should 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. Otherwise, you may need to contact your WordPress hosting provider to see if the problem is on their end.
We hope this article helped you easily fix ‘The link you followed has expired’ in WordPress. You may also want to bookmark our guide on how to fix the most common WordPress errors and check out our expert picks for the best WordPress plugins to grow your site.