fb-pixel

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

Published in:

by:

No matter how diligent you are with your website, you’ll eventually run into a WordPress error, especially if you’re regularly uploading media files, making changes, and installing different themes and plugins. 

However, just because you’re experiencing an error doesn’t mean you need to stress about it. Often, a lot of WordPress errors can be a quick fix, including the The Link You Followed has Expired error. Below, we’ll take a look at the common causes of this error and show you multiple ways you can solve it, so you can get your site back online. 

There are a few different reasons the The Link You Followed Has Expired WordPress error occurs. Usually, you’ll see this error after you install or update a theme or plugin, make changes to existing WordPress code, or try to upload a large media file.

This is what the error will look like:

The Link You Followed Has Expired Error Code

Unlike other errors, this error doesn’t directly tell you what problem you’re experiencing and doesn’t directly relate to the problem on your site. This error is caused by website files that exceed the upload limit. 

Your web host usually sets an upload limit large enough for most websites, so this issue doesn’t occur. However, if you’re on a cheaper hosting plan, then this limit might be set to a lower number. 

The easiest way to check your current limit is to go to your WordPress dashboard and navigate to Media > Add New and then right underneath the upload box, you’ll see the Maximum upload file size.

The Link You Followed Has Expired Error View Limit Media Library

In the image above, you’ll see that it currently has a maximum upload file size of 512 MB, which is actually quite large. If you have a website with multiple contributors, then you may actually want this lower. 

This will encourage your contributors to optimize images and other media, which can help to improve your loading speeds and search engine rankings. Usually, when images and other media are uploaded too large, you’ll get a “Maximum execution time exceeded” or “WordPress memory exhausted” error. 

If you haven’t uploaded any plugins or themes recently, you’re most likely getting this error due to a plugin conflict. This can be common after updating your plugins. You’re getting this error because there’s no specific error code that matches, so this is the fallback error message. 

Regardless of why you’re experiencing the error, one of the methods below can help you fix the problem. 

What to Do Before You Make Any Changes

Before you start fixing the The Link You Followed Has Expired error, it’s important to back up your website. Almost all of the methods below involve editing your WordPress website’s code. So, to avoid potential issues you always want to make sure your site is fully backed up before you make any changes. 

That way, if you do run into any future errors, or if making changes causes additional problems, you can always restore to a previous version.

As a best practice, it’s always a good idea to back up your website regularly and before running any sitewide core, theme, and plugin updates. So, if an update happens to cause any errors with your site, you can restore to a version that works properly. 

Finally, if you’re uncomfortable editing code, or making changes to site files via cPanel. Then you may want to use the alternative options just after the three main methods below. 

Below you’ll learn how to solve the link you followed has expired error on your site. Simply use one of the methods below that you’re most comfortable with.

1. Edit the functions.php File

The first way you can fix this error is by editing your functions.php file. There are a few different ways you can access this file. 

First, if you have access to the backend of your site, you can go to Appearance > Theme File Editor. Then, on the right-hand side of the screen, look for a file that says Theme Functions and click on it to open it. This is your functions.php file.

The Link You Followed Has Expired Error Open Functions

Then, all you need to do is copy and paste the following code at the bottom of the file.

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

This code snippet will increase the upload max and post max size, while also increasing the execution time, which is how long a task can execute before terminating. 

In the code example above, we’ll increased the limit to 512 MB for the upload and post sizes and changes the execution time to 300 seconds. You’re welcome to change the values, so they’re larger than the file you’re trying to upload. If you think it’s going to take a while to upload a larger file, then make sure you adjust the max_execution_time as well. 

Once you’re finished, make sure to click the Update File button to save your changes. 

Alternatively, you can connect to your website via FTP or log in to cPanel and use File Manager to edit your website files.

Note that any changes you make to this file will be erased when you update your theme or switch to a different one. So, make sure that you add this code back after updating or switching themes.

Alternatively, you can create a child theme, which allows you to modify an existing theme without directly editing the theme’s code. The changes you make via child theme will stay intact after updating the original website theme.

Modify the functions.php file with a plugin

Alternatively, you can use a code snippets plugin. This lets you add code to your site without directly modifying the files. If you update your theme or switch to a new theme, then your code snippets will apply to the current active theme. 

There are a few different plugins you can use, but we recommend the Code Snippets plugin. This plugin has over one million active installations and a 4.7 out of 5-star rating.

Once the plugin is installed and activated, all you need to do is go to Snippets > Add New. Then make sure you give the code snippet a title, so you remember what’s for.

Then, make sure the Functions (PHP) option is selected and add the same code snippet as above.

The Link You Followed Has Expired Error Add Code Snippet

Once you’re finished, make sure the Run snippet everywhere button is selected and click Activate so the code snippet is live on your site.

2. Use cPanel to Modify your php.ini File

If you’re using a hosting provider that supports cPanel, you can increase your limits without modifying the files directly.

To do this, login to your cPanel account and then search for MultiPHP INI Editor. You’ll find it in the software section of your dashboard.

The Link You Followed Has Expired Error Multiphp Ini Editor

Then, go to the Select a location section and select your domain name from the drop-down list. Then, you’ll need to modify the max_execution_time, upload_max_filesize, and post_max_size. Make sure to click Apply to save your changes. 

The Link You Followed Has Expired Error Phpini Editor Cpanel

Modify the php.ini File Directly

You can also modify the php.ini file directly and make the same changes that you did above. If your hosting provider doesn’t suppot cPanel, then this lets you directly edit the file.

To modify this file, you need to connect to your server via a tool like FileZilla or Cyberduck, navigate to your public_html folder, or your root folder where your website files are, and locate the php.ini file.

Then, simply modify or add the following lines of code:

upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300

Make sure you change the values to your preferred limits. 

3. Edit Your .htaccess File

Another WordPress file you can edit to fix the error is the .htaccess file. This configuration file manages how your site interacts with your server. You can increase your limits by adding code to this file. 

You might need to make this file visible, since it’s often hidden. To do this, navigate to the backend of your hosting dashboard and go to File Manager > Settings, and then make sure the Show Hidden Files checkbox is checked.

The Link You Followed Has Expired Error Show Hidden Files

Now, you should be able to edit your .htaccess file, just as you would any other file. You can edit it via File Manager, or using a tool like FileZilla. 

Once you’ve opened your .htaccess file, you need to add the following lines of code. Make sure you add the code before the line of code that says ##END WordPress

php_value upload_max_filesize 512M

php_value post_max_size 512M

php_value max_execution_time 300

php_value max_input_time 300

This code will increase the file size upload limit and total execution time. Make sure you change the values to your preferred limits. Then, you need to save your changes and upload the file back to your server. 

If the methods above didn’t work, or you don’t want to modify your website’s code, check out some of the alternatives below. 

1. Update Your PHP version

If the methods above didn’t work, then an outdated version of PHP could be causing the issue. The easiest way to change your PHP version to the latest version is by either contacting your hosting provider, or upgrading the version yourself if you have cPanel hosting.

If you’re hosting your site with SupportHost, then here’s how you can upgrade your PHP version.

2. Check for Plugin Conflicts

If you’re experiencing the link you followed has expired error when you’re not uploading files, then it’s most likely due to a plugin conflict. 

The quickest way to determine if it’s a plugin that’s causing the problem is by deactivating your plugins one by one. If the error goes away when you disable a certain plugin, then that plugin is the likely culprit. 

You also want to make sure it’s not two plugins conflcting with each other that’s causing the error. 

All you need to do is navigate to the Plugins section of your WordPress dashboard. Then, simply go down the list and deactivate each plugin, testing the upload function each time.

The Link You Followed Has Expired Error Deactivate Plugins

If you still want to use the plugin, you can contact the plugin developer for help with troubleshooting. Also, if you haven’t updated the plugin in a while, it could be an outdated plugin causing the issue. 

3. Contact Your Hosting provider

If the methods above don’t work, you can’t edit core WordPress files, or you don’t want to mess around with any code, you’ll have to contact your hosting provider.

Simply reach out to your support team and see if they can increase your memory limit and execution time. A lot of times, they can handle this task for you, and you can fix the link you followed has expired error quickly.

If you’re currently on a SupportHost WordPress hosting plan, then all you need to do is submit a support ticket, and our team can upgrade your memory limit and execution time.

It’s important to mention that if you tried to increase your limit and you’re still experiencing the same error, then you could be reaching the limit of your current hosting plan. You might need to upgrade your hosting to a plan that supports larger file sizes, or you may want to change hosting to another provider. 

How to fix the link you followed has expired WordPress error?

To fix the link you followed has expired WordPress error, you’ll need to increase your memory limit. You can do this by editing your functions.php, php.ini, wp-config.php, or .htaccess file. If this doesn’t fix the error, then you can check for plugin conflicts, upgrade your PHP version, or contact your hosting provider for help. 

Why is my file uploading link expired?

The link expired error usually occurs when you upload a WordPress plugin or theme that exceeds the current file size upload limit. It can also be caused by a plugin conflict, out-of-date plugin, or an old version of PHP. 

How to increase the WordPress upload limit?

To increase the WordPress upload limit and fix the error, you’ll need to modify your functions.php, php.ini, wp-config.php, or your .htaccess file. 

The The Link You Followed Has Expired WordPress error message usually occurs when you upload a theme or plugin that exceeds the file size upload limit for your site. It can also be caused by a plugin conflict or an outdated PHP version.

Luckily, there are a few different ways you can fix this error on your own:

  • Edit your functions.php file
  • Modify your php.ini file
  • Add code to your wp-config.php file
  • Edit your .htaccess file
  • Update your PHP version
  • Check for plugin conflicts
  • Contact your hosting provider.

Hopefully, you were able to use one of the methods above to help fix the link expired error on your site.

Which of the above methods did you use to fix the error? Please share in the comments below!


Try one of our hosting plans for free and without obligation for 14 days. No payment information required!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *