WP Umbrella Logo

How to Fix the ‘The Link You Followed Has Expired’ Error in WordPress Quickly

The WP Umbrella Team

Is WordPress telling you: “The link you followed has expired.” ?

Beginners are put off by this error because it does not tell them much about what is actually wrong.

No worries, this is a common WordPress error that appears when attempting to upload themes and plugins through WordPress’ dashboard.

The purpose of this article is to show you how to fix the ‘the link you followed has expired.’ error in WordPress. I’ll also explain you what causes this error and how to prevent it in the future.

Quickly troubleshooting the Link you followed has expired error

Fixing the “link you followed has expired” error is easy. All you need to do is to increase the maximum upload size and execution times for your website. In order to do this, you’ll have to edit a core WordPress file and copy a few lines of code.

Understanding the “The Link You Followed Has Expired” Error

The link you followed has expired error in WordPress.

This message is displayed when you’re trying to upload themes, plugins, or even large media files via the WordPress dashboard.

It’s basically WordPress’ way of telling you that you’ve exceeded some sort of limit set by your hosting server. These limits could be related to the maximum upload size, PHP execution time, or PHP memory limit.

While these restrictions are in place to keep your server running smoothly and securely, they can sometimes interfere with your usual WordPress activities.

Ready to boost your productivity, impress your clients and grow your WordPress agency?

Install WP Umbrella on your websites in a minute and discover a new way to manage multiple WordPress sites.

Get Started for free

When you go to the WordPress dashboard and click ” Media “, then “Add New”, you’ll find there’s a limit to the upload size.

Uploading a media in WordPress

Depending on the web-hosting plan you use, you’ll get some types of prefixed maximum upload file sizes. 

While managed WordPress hosting might give you the freedom to upload files larger than 100 MB, shared hosting plans often cap it at 25 MB or even lower.

These constraints exist to ensure server stability, prevent misuse, and optimize resource allocation among all hosted websites. Often, it’s these limitations that trigger the error in question.

Ready to boost your productivity, impress your clients and grow your WordPress agency?

We care about your data in our privacy policy.

Although the error message may seem perplexing at first, solutions do exist, and they involve tweaking a few server settings. The objective is to adjust the PHP memory limits and maximum file upload sizes to accommodate your needs.

There are 3 ways of doing that, each with its own set of pros and cons. The choice of method should be guided by your hosting environment and technical comfort level.

Method 1: Increasing Limits in functions.php File

This method is simpler, but there is one negative side effect. If you change your theme, your website will return back to the limits it had before. 

Consider using one of the other two methods listed below if you plan on changing your theme.

Include 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' );

The upload/post/max_size parameters should be increased to match the file you are trying to upload.

Increase the file’s max_execution_time to the amount of time you think the upload will take. 

Feel free to double this value if uncertain.

Method 2: Increasing Limits in .htaccess File

The .htaccess file in WordPress is used to control how Apache (the server) serves files that are located in the root directory, and subdirectories. 

You can edit the .htaccess file to increase PHP memory limits and troubleshoot the “Link You Have Followed Has Expired” Error.

editing the .htaccess file

You can edit the .htaccess file by connecting to your website via FTP.

Download it, open it, and add the following code at the end of 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

Make sure you save your changes before uploading the file back to your website.

Method 3: Increasing Limits in php.ini File

Locating the .htaccess file is not always straightforward. That’s why i’ll propose you a third way to fix the “Link You Followed Has Expired” Error in WordPress: the php.ini file.

If you want to avoid that entirely, and also not use the functions.php method, there is still another option: the php.ini file.

But be aware that if you have a shared hosting plan, you may not have the php.ini file, or it might not be editable by you.

 When that happens, you may want to try creating a blank php.ini file in the root directory of your website.

Put the following lines of code in the php.ini file once you have located/created the file:

upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300

Your error should be resolved after you save the changes and upload back the php.ini file!

After fixing the “The Link You Followed Has Expired” error, it’s a good idea to take a few preventive steps to avoid facing the same issue in the futur. Here are some tips:

1. Regularly Check Your Hosting Limits

Make sure your hosting plan meets the demands of your website, especially for file upload and memory limits. Many entry-level hosting plans have strict limitations, so consider upgrading if you frequently upload large files or work with resource-intensive plugins.

2. Optimize Your PHP Configuration

If you’re comfortable with adjusting PHP settings, keep your upload_max_filesize, post_max_size, and max_execution_time parameters at levels suitable for your needs. Higher values can help you avoiding interruptions during image uploads or plugin/theme installations.

3. Use a Quality Theme and Reliable Plugins

Low-quality themes and plugins can trigger this error. Choose reliable, well-supported themes and plugins that won’t demand excessive resources, and lways check compatibility with the latest WordPress version.

4. Keep WordPress and PHP Updated

Regularly update WordPress and your PHP version to benefit from performance improvements. Updating also ensures your site has the latest security patches, which can prevent other potential issues.

5. Limit Large File Uploads

If your site doesn’t require uploading large media, consider limiting your upload size settings to avoid any issues.

6. Backup Configuration Files Before Editing

Any time you make adjustments to .htaccess, functions.php, or php.ini, take a quick backup with WP Umbrella. This way, if anything goes wrong, you can easily revert to the previous settings without causing any disruptions to your site.

Following these preventive measures should help you avoid running into this error in the future.

Conclusion

Navigating and resolving the “The link you followed has expired” error doesn’t have to be a nightmare. This guide is here to help you solve the problem once and for all, so you can get back to managing your WordPress site without these annoying interruptions.