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

Are you getting an error message that says “The link you followed has expired” in WordPress?

This mistake does not provide many clues as to what is actually wrong, which makes it tough for beginners to remedy.

We’ll teach you how to simply resolve the ‘the link you followed has expired’ error in WordPress in this article. We’ll also discuss why this problem occurs and how to avoid it in the future.

Fixing the error 'The link you followed has expired'

What Causes the Error The Link You Followed Has Expired?

This issue commonly happens when you try to upload a WordPress theme or plugin from the WordPress admin area to your website.

An error message appears on a WordPress website when you click on a link that has expired.

The size of files you can upload from within the WordPress admin area is controlled by an option on most WordPress hosting companies. They also include a setting that prevents scripts from executing for an excessive amount of time.

Visit the Media » Add New page to check the file size upload restriction.

There is a file upload restriction with WordPress.

These limits improve the overall efficiency of your WordPress hosting server and make your website safer.

If these values are too low, or if you attempt to upload a larger file, you will receive errors such as memory exhausted or maximum execution time being exceeded.

If you’re trying to upload a WordPress theme or plugin, though, you’ll get an error saying “The link you followed has expired.”

So, let’s have a look at how to quickly resolve this issue.

Fixing the Error ‘The Link You Followed Has Expired’

Increasing the file upload size, PHP memory, and execution time restrictions for your website is the easiest approach to fix the ‘The link you followed has expired’ error.

There are several options for doing so. We’ll show you all of them, and you may pick the one that appears to be the most user-friendly or the one that works best with your hosting environment.

Method 1: Increasing the functions.php file’s limitations

This method is simpler, but it comes with a disadvantage. If you change your WordPress theme, your site will revert to its previous limitations. If you want to change your theme, you can use one of the other two methods listed below.

Simply paste the following code into the functions.php file of your WordPress theme.

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

You can make upload max size and post max size larger than the file you’re trying to upload by increasing their settings.

You’ll also need to increase max execution time to the amount of time you believe the file will take to upload. If you’re still unsure, try double this value.

Method 2: Increase the 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.

You’ll need an FTP client or the cPanel File Manager program to edit the.htaccess file for this procedure.

Simply use FTP to access your website and change the.htaccess file.

Using FTP to edit the.htaccess file

Now, at the bottom of your.htaccess file, paste the following code.

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 work and re-upload the file to your website.

Method 3: Increase the restrictions in the php.ini file.

The php.ini file is a PHP and WordPress configuration file. You’ll need to use an FTP program to connect to your WordPress site and seek for the php.ini file in the root folder.

Because most users have a shared hosting account, they may not be able to find it in the root folder of their website. In such scenario, you’ll need to use a plain text editor like Notepad to generate a blank php.ini file and upload it to your website.

Now open the php.ini file and paste the code below into it.

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Remember to save your work and re-upload the file to your website.

You can now try to upload the theme or plugin file to your website. You should be able to upload the file after the error has gone away.

If it doesn’t, try increasing the file limits to match the size of the file you’re trying to upload.

We hope this post was helpful in resolving the error ‘The link you followed has expired’ in WordPress.