Enter your search term

Search by title or post keyword

How to Fix the “Link You Followed has Expired” Error in WordPress

Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website

Contact us for Questions

WordPress is not error-proof despite being the world’s most used Content Management System, CMS and one of the user-friendliest website builders on the internet.

As a WordPress website owner, there’s seemingly nothing more frustrating than trying to install a plugin or upload a file, only to be met with the dreaded “the link you followed has expired” error.

Fortunately, this error is easy to deal with. In this article, we look at several instances of this error and explore ways to fix it.

By the end of this tutorial, you’ll be clear on what causes the “the link you followed has expired” error and what you need to do to get your WordPress site working perfectly again. Let’s go.

What Does it Mean That Your Link Has Expired?

The “link you followed has expired” error message typically appears when trying to upload a file, install a WordPress plugin or theme, or perform a similar action involving file uploads.

It indicates that the file you are trying to upload or the operation you are attempting to perform has exceeded the maximum file size limit or execution time limit set by your server or hosting provider.

How Long Do Links Last?

The lifespan of a link can vary depending on several factors, including the type of link, the platform on which it was posted, and the actions of the link’s owner.

In general, the longevity of a link might range from a few minutes to several years or even forever.

What You’ll Need to Fix the “ the Link You Followed has Expired” Error in WordPress

  • Hosting Cpanel: Sometime, you may need to edit the WordPress core files on your server. You can access this file under the File Manager on your Web host Cpanel
  • WordPress Admin Access: Some Fixes require you to make changes from within the WordPress admin area. In such cases, you need an admin or super admin role on the WordPress site.
  • SFTP/FTP Client Software: If you cannot access your WordPress file from the Cpanel for whatever reasons, an SFTP/FTP tool can help connect to your server.
  • Knowledge of Editing Files: You should have some basic knowledge of editing files such as wp-config.php and .htaccess files. This will enable you to add the required code to fix the error.
  • A WordPress Backup: It’s always recommended to back up your site before making any changes. This will ensure you have a copy you can restore if something goes wrong.

How to Fix the “Link You Followed has Expired” Error in WordPress: The Basics

If you see the “the link you followed has expired” error on your WordPress website, this error gives no clue as to the underlying cause of the problem, which is why it’s difficult for most WordPressers to figure out and resolve.

What to note about this error is that it only comes up when you attempt to install a new WordPress theme, plugin or media file from the admin area.

Most WordPress hosting providers limit the size of files users can upload to WordPress. This is done to keep your website safer and enhance overall performance.

So any attempt to upload a file that exceeds this limit leads to the “The link you followed has expired” error.

Also, WordPress has a maximum execution time for scripts. If an upload takes too long, PHP will timeout, and the user will receive the “The link you followed has expired” error message.

10 1

You can check your site’s preset file size limit from within your WordPress admin area. Just navigate to Media > Add New on the left panel of the dashboard homepage.

You should see the Maximum upload file size right below the box where you upload media files, as in the picture below.

11 1

For the website above, as you can see, the maximum upload limit is 1 MB. You can increase and decrease this as applicable to your situation.

However, It’s advisable always to keep the file size upload limit as minimal as possible.

This will help ensure your media uploads, videos and images are optimized and facilitate better website performance. This is especially important if you run a site with multiple contributors.

Also, some hosting companies for WordPress have settings that stop PHP scripts from running when the maximum execution time has been exceeded.

When you try to upload large files, which takes longer than expected, this can also trigger the “The link you followed has expired” error.

That being said, let’s look at how you can fix the….

How to Fix the “Link You Followed has Expired” Error in WordPress: 3 Methods

There are 3 effective ways to fix the “The link you followed has expired” error in WordPress. We’ll take each of the fixes step by step.

  • Fix #1: Increase File Upload Size Using functions.php
  • Fix #2: Editing the .htaccess File
  • Fix #3: Using php.ini File

Before you start, we advise again that you make a Backup of your WordPress website, as you’ll be editing your site’s code to fix the problem. First, back up your site to avoid data loss or other extreme damages.

The simple solution to the error is to increase the file upload size. But you should remember that changing the upload_max_filesize in WordPress to a larger limit requires updating max_execution_time.

Updating one without the other might still present the error once the maximum execution time is exceeded.

The logic is simple. Larger files require more execution time to upload.

On this note, the fixes we’ll be showing you in this guide take into account the following 3 critical elements:

  • Maximum File Size: This is the size of files your website presets to allow its upload. It’s represented in PHP as upload_max_filesize. If It’s small, you won’t be able to upload larger files. Hence, the “The link you followed has expired” error.
  • Maximum Post Size: This dictates the maximum post size for your website. Increasing the file size limit alone won’t work if this limit is too low. You must also update the post size to upload bigger files to WordPress. It’s represented in PHP by max_post_size.
  • Maximum Execution Time: This determines how much time WordPress should spend attempting your upload before throwing up the error. It’s represented in PHP by max_execution_time.

Down with that? We’ll show you how to update this in WordPress using 3 different methods. Let’s go.

Fix #1: Increase File Upload Size Using functions.php

The first method to fix the “The link you followed has expired” error is to increase the WordPress file upload limit by editing the function.php file. Here’s how.

On your WordPress admin dashboard, hover over Appearance and click on Theme File Editor from its menu.

12 1

This will take you to the Stylesheet file for your current WordPress theme as below.

In our case, the active theme is Twenty-Twenty-Three, the current theme used by the website we are editing.

Under Stylesheet on the right panel, click Theme function (Function.php). 

13 1

Once the function.php code opens, copy and paste the code snippets below.

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );

You can change the values in this code to what works best for you.

The rule of thumb here is to ensure that the value in the upload_max_size and post_max_size is higher than the file you want to upload.

Likewise, increase the value of the max_execution_time according to the file size. If you are unsure, doubling the value above is the standard practice.

Here’s what it looks like.

14

Once done, click the Update File button to save your changes. This should help solve the “The link you followed has expired” error.

Some themes will not allow you to edit theme files from the admin area.

In that case, you can access your website files using an FTP tool or the Cpanel on your hosting platform. We’ll use the latter method to show you quickly.

For this tutorial, we use Hostinger Cpanel. But don’t worry. For other web hosts, the steps are the same. Just follow along.

Log in to your hosting account Cpanel. Locate Files and click to open File Manager.

15

Inside File Manager, navigate to public_html>wp-content>themes>your_theme_name.

That should be the current theme on your website. Next, locate the function.php file, right-click on it and select Edit.

16 1

Next, copy and paste the code above and click the Save icon at the top right corner.

17 1

And that’s it. You’ve successfully increased the upload size.

While this method is fairly straightforward, you should bear in mind that the settings you’ve just made only apply to your current theme.

These settings will be erased once you update your theme or switch to another WordPress theme.

To avoid this, consider making these changes to your Child theme to ensure your settings are retained regardless of theme updates. Even with that, there’s still a downside- changing your theme will delete the settings.

Fixes #2 and #3 are save bets to avoid any issues altogether.

Fix #2: Edit the .htaccess File to Fix the “The link you followed has expired” error

The second method to increase the upload limit and fix the “The link you followed has expired” error is to edit your WordPress .htaccess file.

The .htaccess file is a hidden PHP file in your website root directory that allows you to modify WordPress configuration by adding some custom code.

To use this method, access your website root folder from your web host Cpanel or via an FTP Client software.

We’ll show you both methods. Let’s start with the easiest, via Cpanel,

Log in to your web host Cpanel, go to Files and select File Manager under it.

15 2

Inside file Manager, open the root directory, public_html folder.

This is the same folder containing the wp-config.php and wp-admin folder.

Locate .htaccess, right-click on it and collect Edit to open.

18

Next, copy and paste the following code snippet inside as below and click the Save icon button at the top right corner.

php_value upload_max_filesize 128M

php_value post_max_size 128M

php_value max_execution_time 300

php_value max_input_time 300
19

That’s All. The error should be fixed now. Try the action that leads to the error to confirm.

To use the other method, which is with an FTP client. You need to connect to your website server.

You need 2 things to do that, FTP software and your FTP credentials.

Cyberduck and FileZilla are two great FTP options. Both tools are free. We’ll use Cyberduck for this example.

First, you need to download and set up Cyberduck on your computer. After that, you’ll connect to your web server using your FTP credentials.

You should find these credentials in hosting Cpanel. In most cases, it will be under FTP Accounts.

Untitled 3

Once you have it, go back to Cyberduck. Click Open Connection at the top left, fill out the required fields, and click the Connect button.

20 1

Once you are in, navigate to the public_html folder and locate .htaccess file.

If you can find it, it means it’s hidden. Simply type .htaccess in the search bar to reveal it.

21

Once you find the file, Download it to your computer and open it in your favorite text editor. Next, add the code snippet below:

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 of each function to what you like. After that, save your changes and Upload the edited .htaccess file to your public_html folder.

Now go back to your WordPress site to see if the new upload limit has been successfully implemented.

Fix #3: Using php.ini to Fix  the “The link you followed has expired” error

The last method to increase the filesize upload limit and resolve the “The link you followed has expired” error is via php.ini file.

The php.ini file is a WordPress PHP configuration file where you can increase the PHP memory limit without tampering with your .htaccess file.

This file is located in the WordPress root folder. However, if you use a shared hosting plan, you may not have access to this file.

In such case, you can create a blank file inside your root folder, name it php.ini and add your code to increase PHP limits.

There are two ways to do this, via your web host Cpanel or FTP client. Let’s take it one at a time. Cpanel first.

Log in to your hosting account and navigate to File Manager.

Once in, open the public_html folder and look for php.ini. It means your site doesn’t use one if you can’t find it.

Once you are sure the file is unavailable, click the New file in the left sidebar.

22 1

You’ll see the New File pop-up. Name the file php.ini and click the Create button.

23

Once the file opens, paste in the code snippet below and remember to click the Save icon at the top-right corner.

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

Here’s what your file should look like;

24

After that, you can check WordPress to see of the error has been fixed.

The other way to use php.ini to increase upload size is to use an FTP tool. The steps are same methods as in Fix #2 above. Here’s what you need to do;

First connect the FTP tool to your server. Once you are in, navigate to public_html folder and click to open.

Next, you have to create a new php.ini file. Right click on a blank section of the page and select New files from the resulting menu.

A name window will pop up, name your file php.ini and click on the Create button.

Now add the same code snippet as above and click the Save button to store your settings.

Done! You’ve successfully increase file upload size using php.ini and that should fix the xyz error.

More Helpful Error Troubleshooting Tutorials;

Wrapping up

There you have it. 3 effective troubleshooting methods to fix WordPress’s “The link you followed has expired” error. Just ensure you back up your site before attempting any of them.

We hope this article helped you easily fix the problem. If you need help with other common WordPress problems, drop us a line in the comment section below.

Meta Description: Don’t panic if you see the “The link you followed has expired” error on your WordPress website. It’s simple to fix with this stepwise guide.

Leave a Comment