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, Media file like image/video, etc to your website from the WordPress admin area.
How To Fix “The Link You Followed Has Expired” Error in WordPress
WordPress hosting companies have a setting that controls the size of files you can upload from 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 Media » Add New button.
Method 1. Increasing limits in functions.php file
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.
Method 2. Fix by increasing limits in the .htaccess file
For this method, you will need to edit the .htaccess file by using an FTP client or the File Manager app in cPanel.
Now, you need to add the following code at the bottom of your .htaccess file.
Step 1: Login To CPanel
Step 2: Find And Open The File Manager
On the public.html folder you’ll see the .htaccess file. Right-click on this file and choose Edit.
Step 3: Copy The Code and Pate the following lines of code at the end 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
Method 3. Fix by increasing limits in php.ini file
Step 1: Create A PHP.ini file
First, open a blank notepad and copy and paste the following lines of code into it.
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
Step 2: Upload The File
Navigate back to your server and go to the public.html folder. Then upload the PHP.ini file that you’ve just created on your computer.