Do you see an ‘expired link’ error in WordPress?
Beginners are sometimes confused by this error since it doesn’t provide many clues as to what is actually wrong.
In this article, we will explain how to fix the WordPress ‘the link you followed has expired error. Also, we will discuss how to avoid this error in the future.
What Causes The Link You Have Followed Has Expired Error?
The WordPress admin area typically displays this error when you try to upload a WordPress theme or a plugin to your website.
Hosting companies for WordPress have a setting that limits the size of files you can upload inside the WordPress administration area. There are also settings that prevent scripts from running too long.
When you visit the Media » Add New page, you can view the file size upload limit.
The restrictions make your website safer and improve the performance of your WordPress hosting server.
This may result in errors such as ‘memory exhausted error’ and ‘maximum execution time exceeded error’ if these settings are too low, or if you are uploading a larger file.
The link you followed has expired, however, if you are trying to upload a WordPress theme or plugin.
As a result, let’s look at a simple fix for this problem.
Fixing ‘The Link You Have Followed Has Expired’ Error
Increasing your website’s file upload size, PHP memory, and execution time limits will fix the ‘The link you followed has expired error.
This can be accomplished in several ways. You can choose from all of them, and we will show you which one is easiest to use or works best in your hosting environment.
Method 1. Increasing limits in functions.php file
There is a downside to this method, but it is easier. If you change your WordPress theme, your site will revert to its old limits. If you are planning on changing your theme, you can try one of the other two methods below.
This code should be added to the functions.php file of your WordPress theme.
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300'
You can increase upload_max_size and post_max_size to be larger than the file you are uploading.
Furthermore, you will have to increase the max_execution_time to the amount of time you think the file will take to upload. If you are not sure, you can try doubling this value.
Method 2. Fix by increasing limits in the .htaccess file
You can use the .htaccess method if you don’t want to add code to your theme’s functions file.
To use this method, you will need to edit the .htaccess file through an FTP client or the File Manager application in cPanel.
You can edit the .htaccess file by connecting to your website through FTP.
Now, you need to add the following code to 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
Remember to save your changes and upload the file again.
Method 3. Fix by increasing limits in php.ini file
PHP and WordPress use the php.ini configuration file. You will need an FTP client to connect to your WordPress site and locate the php.ini file in the root directory.
As most users have shared hosting accounts, they may not find it in the root folder of their website. If this is the case, you will need to create a blank php.ini file and upload it to your website using a plain text editor such as Notepad.
Add the following code to the php.ini file.
- upload_max_filesize = 128M
- post_max_size = 128M
- max_execution_time = 300
Make sure you save your changes and upload the file again.
Now you can upload the theme or plugin to your website. The error would disappear, and you would be able to upload the file.
If it does not, then increase the upload limit to match the size of the file you are trying to upload.
This article hopefully helped you fix the ‘The link you followed has expired’ error in WordPress.
Subscribe to our YouTube channel for more WordPress video tutorials if you liked this article. Feel free to follow our Twitter and Facebook accounts too.