top-arrow

Fix WordPress Error ‘The Link You Followed Has Expired’

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.

It’s a little bit difficult for beginners to figure out what exactly causes the issue.

WordPress Error View

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, you’ll 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.

Fix WordPress Error Limit Issues

Even if you have the larger value of upload file size limit but the website’s maximum execution time is limited, then WordPress will fail to upload larger files which might cause the error “The link you followed has expired”.

To fix the error you just have to increase the Maximum Upload File Size limit, maximum execution time limit, and PHP Memory limit.

We will need to edit some core files of WordPress from the Hosting Cpanel file manager and add a few lines of code. 

There are a few methods to do that. We will guide you through all the methods in this article. 

You have to apply one method at a time. If a method doesn’t 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

cpanel login

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

cpanel 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

cpanel file manager folder

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 you’re done editing.

Fix WordPress Error via .htaccess file

This trick should fix the issue. If it doesn’t 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 let’s 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

Fix WordPress Error via php ini file

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 doesn’t 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.

Fix WordPress Error via function.php

Copy and paste the following code into the WordPress theme’s functions.php file and save it.

@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M');
@ini_set( 'max_execution_time', '300' );

Conclusion

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.

Tags:

0 comments

Leave a Reply

Sajjad Hossain
about me

Sajjad Hossain Sajib

Hey. Welcome to my profile. I am a professional web designer and developer. Mainly I am specialized in Wordpress and e-Commerce. I love to learn things and share. So stay connected with WebExtent to get the latest tips and tricks, and tutorials.