Are you having a problem with The link you followed has expired WordPress error.? In this article, we will show you how to fix the WordPress error The link you followed has expired error and how to get rid of this in the future.
Its a little bit difficult for beginners to figure out what exactly causes the issue.
What causes the WordPress error The Link You Followed Has Expired?
This error happens when you try to upload a WordPress theme or plugin to your website.
If you go to Media » Add New page from your website admin dashboard, youll notice that by default WordPress has a limit of maximum file upload size which is not enough.
So the system prevents file uploading when someone tries to upload a theme or plugin larger than the limit.
Even if you have the larger value of upload file size limit but the websites maximum execution time is limited, then WordPress will fail to upload larger files which might cause the error The link you followed has expired.
How to fix The Link You Have Followed Has Expired WordPress Error?
To fix the error you just have to increase the Maximum Upload File Size limit, maximum execution time limit, and PHP Memory limit.
There are a few methods to do that. We will guide you through all the methods in this article.
- Method 1: increasing limits in .htaccess file
- Method 2: increasing limits in php.ini file
- Method 3. Increasing limits in functions.php file
You have to apply one method at a time. If a method doesnt work then reverse the changes you have made and try the next method.
Note: Make sure to backup your website and make copies of the files before editing any of WordPress core.
Method 1: increasing limits in .htaccess file
.htaccess file is a code file of WordPress. We can edit the .htaccess file and copy the code to this file to increase the limit.
We need access to the file manager of the Cpanel to edit the file.
Step 1: Login To CPanel
Login to your Cpanel via hosting account or visit (yourwebsite.com/cpanel) for cpanel login. Enter your Cpanel username and password to access.
Username and password are provided to welcome email from hosting provider.
Step 2: Find And Open The File Manager
From the panel, find and open File Manager. Navigate to public_html folder where you WordPress website is normally hosted.
Step 3: Copy The Code
In the public_html folder, find the .htaccess file. Right-click on it and choose edit.
Copy and paste the following code inside 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
Save the file once youre done editing.
This trick should fix the issue. If it doesnt help then reverse the changes and try the next method.
Method 2: increasing limits in php.ini file
Some hosting automatically create php.ini files while installing WordPress. If it doesn’t exist you create a new file and upload the server.
Follow the step detailed in the previous method to navigate to the public_html folder and check if there is already php.ini file exist. If not then lets create one.
Step 1: Create A PHP.ini file
The php.ini file needs to be created on the computer and then we have to upload it to the file manager on the public_html location.
First, open a blank notepad file and paste the following code into this.
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
Save the file by naming it php.ini
Step 2: Upload The File
Now Back to the file manager, navigate to public_html and upload the php.ini file you already created on the computer.
This should fix the problem. If the above method doesnt help in your case try the next method to increase the limit using function.php on WordPress theme.
Method 3. Increasing limits in the functions.php file
This is an easier way to increase the limit. But there is a problem. If you change the theme, the website will return back to old limits. If you are planning to change the theme, please try the above two methods.
Follow the step detailed in method one to navigate to the public_html > wp-contents > theme and search for the function.php file in the current theme folder.
Copy and paste the following code into the WordPress themes functions.php file and save it.
@ini_set( 'upload_max_size' , '120M' ); @ini_set( 'post_max_size', '120M'); @ini_set( 'max_execution_time', '300' );
Hope this guide helped you to fix the WordPress error The Link You Followed Has Expired.
Sometimes, hosting providers may have restrictions to prevent uploading large files, in that case, you will need to contact the Hosting Service Providers and ask for help. They should be able to help you.