How To Fix “The Link You Followed Has Expired” Error in WordPress

Is WordPress showing the “The link you followed has expired” error each time you attempt to upload a theme or plugin through the WordPress dashboard?

This error can be frustrating especially for beginners because it doesn’t come with many clues about the actual cause of the error.

This error tends to occur when you attempt to upload a file that is larger than the set execution and upload limit of WordPress. You can easily fix this error by increasing your WordPress default upload limits.

In this article, I will guide you through how to fix “the link you followed has expired” error in WordPress.

What’s the Cause of “The Link You Followed Has Expired” Error?

“The link you followed has expired” error tends to occur when you attempt to upload a theme or plugin to your website through the WordPress admin dashboard.

Hosting providers tend to maximum upload size limit that controls the size of files that you can upload through the WordPress admin dashboard. This upload size limit depends on your web hosting plan. Some hosting providers offer a maximum upload limit of up to 100MB, while shared hosting comes with the smallest upload limit size of 25MB or less.

These restrictions keep you from uploading large themes or plugins which may affect the performance and security of your WordPress server.

 You can check your file size upload limit by simply opening the WordPress admin dashboard, selecting Media, and then clicking on Add New. This will show you the default WordPress upload size limit.

How to Fix “The Link You Followed Has Expired” Error

You can easily fix “the link you followed has expired” error by increasing the default upload file size and PHP memory limit of your WordPress website.

There are various ways you can do that, and I’ll take you through every step so you can find a method that fits in best with your hosting environment.

Read Also  Setup your own Online store in 30 Minutes!

Method 1: Increase limits in the functions.php file

This is a simpler method, although there’s a downside to it. The functions.php file is tied to the current theme you are using on your WordPress website, so if you change the theme, your website will return to the default limits.

You should go for this method if you aren’t planning on changing your theme anytime soon. But if you will be making any theme changes soon, then you should go for the other methods.

Go to your WordPress theme’s functions.php file and add the following code to it:

@ini_set( ‘upload_max_size’ , ‘120M’);

@ini_set( ‘post_max_size’, ‘120M’);

@ini_set( ‘max_execution_time’, ‘300’);

Ensure that the upload_max_size and post_max_size is increased to the size you need for the file you want to upload. 

You should also ensure that the max_execution_time is increased to the amount of time you need to upload the file. You can always increase the value if you aren’t sure.

Don’t forget to save the changes to the file.

Method 2: Increase limits in the .htaccess file

This is the best option if you change your WordPress theme often. Simply access the .htaccess file in your website’s root directory using an FTP client or through your cPanel.

Once you have connected to your website using an FTP client, go to the root directory and download the .htaccess file. When the download is complete, open it with a text editor and paste the following line of code at the bottom of the 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

You can adjust the value to one that fits your need. Don’t forget to save adjustments you have made before you upload the file to your website.

Method 3: Increase limits in the php.ini file

Sometimes it can be a little challenging to find the .htaccess file. In such cases you can fix the “link you followed has expired” error using the php.ini file.

Read Also  6 Recommended WordPress Plugins For Marketplace Website

The php.file is used by PHP and WordPress for the configuration of your website and is located in the root directory of your site. But, if you are using shared hosting, you may not find the php.ini file in the root directory, or you won’t be able to edit the file. 

In such case, using your device’s text editor you can create a blank php.ini file for your website and upload it to the root directory.

Add the following code to the php.ini file once you have found or created it:

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 300

When you are done uploading the file back to the root directory and saving the changes, now go back to the website, this should fix the “link you followed has expired” error.

Leave a Reply

%d bloggers like this: