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

WordPress is usually friendly. It lets you upload themes, add plugins, and build pages without touching much code. Then one day, it throws a tiny tantrum: “The link you followed has expired.” Rude, right? The good news is that this error is common, fixable, and not as scary as it sounds.

TLDR: This error usually happens when your WordPress upload limits are too low. For example, if your theme file is 25 MB but your site only allows 8 MB uploads, WordPress may show “The link you followed has expired.” instead of a clear warning. In most cases, you fix it by increasing upload_max_filesize, post_max_size, and max_execution_time. If you are not comfortable editing files, ask your web host to do it.

What does this error mean?

The message sounds like you clicked an old link. But most of the time, that is not what happened.

In WordPress, “The link you followed has expired” often appears when you are trying to upload something big. This might be:

  • A premium theme file
  • A large plugin file
  • A media file
  • A backup or import file

WordPress tries to process the upload. But your server says, “Nope. Too big. Too slow. Too much.” Then WordPress gives you this confusing message.

Think of it like trying to stuff a giant sofa through a tiny door. The sofa is fine. The door is the problem.

Why does it happen?

This error is usually caused by server limits. These limits control how much data WordPress can upload and how long a task can run.

The main settings are:

  • upload_max_filesize: The largest file you can upload.
  • post_max_size: The largest amount of data sent in one request.
  • max_execution_time: How long a script can run before it stops.
  • memory_limit: How much memory PHP can use.

If any of these numbers are too small, uploads can fail.

Here is a simple example. Your theme file is 32 MB. Your server allows only 16 MB uploads. WordPress tries its best. Then it gives up and shows the expired link error. Not very helpful, but very WordPress.

First, check your upload limit

Before changing anything, check your current limit.

  1. Log in to your WordPress dashboard.
  2. Go to Media > Add New.
  3. Look under the upload box.
  4. You should see something like Maximum upload file size: 8 MB.

If your theme or plugin file is bigger than that number, you found the likely culprit.

Now let’s fix it.

Method 1: Increase limits in the functions.php file

This is a quick option. But use care. The functions.php file belongs to your active theme. If you make a typo, your site may break.

So before you start, make a backup. Always. Backups are like snacks on a road trip. You may not need them, but you will be happy if you do.

Go to your site files using FTP, your hosting file manager, or a WordPress file editor. Find this file:

/wp-content/themes/your-theme/functions.php

Add this code at the bottom:

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

This sets the upload size to 64 MB and gives scripts up to 300 seconds to run.

Then save the file. Try your upload again.

Note: This method does not work on every host. Some hosting companies block these changes. If nothing changes, try another method.

Method 2: Edit the .htaccess file

The .htaccess file is a powerful file used on many Apache servers. It lives in the main folder of your WordPress site.

Again, make a backup first. This file is small but mighty.

Open your .htaccess file and add this code near the bottom:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Save the file. Then refresh your site and try the upload again.

If your site shows a server error after this, do not panic. Remove the code you added and save the file again. Your host may not allow PHP settings inside .htaccess.

Method 3: Create or edit php.ini

The php.ini file controls PHP settings. Some hosts let you edit it. Some do not.

Look in the root folder of your website. If you see a file called php.ini, open it. If not, you may be able to create one.

Add these lines:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
memory_limit = 256M

Save the file. Then try the upload again.

If nothing changes, your host may use a different system. Some hosts use .user.ini instead. In that case, create or edit a file named .user.ini and add the same lines.

Method 4: Change settings in your hosting panel

This is often the easiest method. Many hosts let you change PHP settings in the control panel.

Look for sections with names like:

  • PHP Settings
  • MultiPHP INI Editor
  • Select PHP Version
  • PHP Options

Once you find the settings, increase these values:

  • upload_max_filesize: 64M or 128M
  • post_max_size: 64M or 128M
  • max_execution_time: 300
  • memory_limit: 256M

Save your changes. Then go back to WordPress and try again.

This method is cleaner because you are changing the server settings directly. No tiny file surgery needed.

Method 5: Ask your hosting provider

If you do not want to edit files, this is the best method. Send your host a short message.

You can say:

Hello, I am getting the WordPress error “The link you followed has expired” while uploading a theme or plugin. Can you please increase my PHP limits to upload_max_filesize 64M, post_max_size 64M, max_execution_time 300, and memory_limit 256M?

That is it. No magic spell required.

Most support teams know this error well. They can often fix it in a few minutes.

Method 6: Upload the theme or plugin manually

If WordPress refuses to upload your file, go around it.

You can upload the theme or plugin using FTP or your hosting file manager.

For a theme:

  1. Unzip the theme file on your computer.
  2. Upload the theme folder to /wp-content/themes/.
  3. Go to Appearance > Themes.
  4. Activate the theme.

For a plugin:

  1. Unzip the plugin file.
  2. Upload the plugin folder to /wp-content/plugins/.
  3. Go to Plugins in WordPress.
  4. Activate the plugin.

This avoids the browser upload limit. It is like using the back door when the front door is jammed.

What if the error happens during login or form submission?

Sometimes this error is not about file size. It can also happen because of a security token issue, called a nonce. A nonce helps WordPress check that a request is valid.

If a page sits open too long, the nonce may expire. Then WordPress rejects the action.

Try these quick fixes:

  • Refresh the page.
  • Log out and log back in.
  • Clear your browser cache.
  • Disable caching plugins for logged-in users.
  • Update WordPress, themes, and plugins.

If the problem started after installing a plugin, deactivate that plugin and test again.

Best settings to use

For most WordPress sites, these settings work well:

  • upload_max_filesize: 64M
  • post_max_size: 64M or higher
  • max_execution_time: 300
  • max_input_time: 300
  • memory_limit: 256M

Make sure post_max_size is equal to or larger than upload_max_filesize. If uploads are 64 MB but posts allow only 32 MB, things can still fail.

Final thoughts

The “The link you followed has expired” error is annoying, but it is usually not serious. Most of the time, WordPress just needs more room to upload your file.

Start by checking your upload size. Then increase your PHP limits using your hosting panel, php.ini, .htaccess, or functions.php. If that sounds too technical, ask your host. They have seen this little gremlin before.

Once the limits are fixed, your theme or plugin should upload normally. Then you can get back to the fun part: building your site instead of arguing with error messages.

Similar Posts