Quantcast
Channel: InstaWP
Viewing all articles
Browse latest Browse all 998

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

$
0
0

If you’ve ever tried uploading a plugin or theme and were met with the vague message “The link you followed has expired,” you’re not alone. This error is frustratingly common—and completely fixable.

For WordPress agencies and developers, this typically appears during client onboarding, staging deployments, or heavy media uploads. Fortunately, resolving this error doesn’t require advanced coding skills. It simply means your server is rejecting the upload due to PHP configuration limits.

In this guide, we’ll walk you through what causes this error, how to check your server limits, and how to fix it using beginner-friendly or developer-level methods.

At its core, this error is a timeout or file limit issue. It appears when WordPress attempts to process an action—usually a file upload, but the server cuts it short.

Here’s when you’re most likely to see it:

  • Uploading a large theme or plugin
  • Importing a high-resolution image or video
  • Activating or saving a plugin via the dashboard

The problem? WordPress doesn’t offer a helpful explanation. Instead, it simply dumps the error:
The link you followed has expired

To your client, it looks broken. To you, it’s a call to increase server resources.

What Causes This WordPress Error?

The root of the problem lies in your hosting server’s PHP settings. Most shared hosting plans place tight restrictions on how much memory and processing time your WordPress site is allowed to use.

These four PHP directives are most responsible:

The link you followed has expired

If the theme or plugin exceeds any of these thresholds, WordPress halts the action and returns the dreaded error.

👉 This is especially common on budget hosting providers or on new sites that haven’t configured PHP properly.

How to Check Your Current Upload Limits

Before fixing the issue, it’s a good idea to check the current PHP thresholds on your site.

✅ Method 1: Check via Site Health Tool (No Code)

  1. Go to your WordPress Dashboard
  2. Navigate to Tools → Site Health
  3. Click the Info tab and expand the Server section
The link you followed has expired

Look for these values:

  • Max upload size
  • PHP memory limit
  • Max execution time

If your upload limit shows 2MB or 8MB, that’s the culprit.

✅ Method 2: Use a phpinfo File (Advanced)

If you want full PHP configuration details:

  1. Create a file named phpinfo.php in your WordPress root directory.

Add this code:

<?php phpinfo(); ?>

  1. Visit https://yourdomain.com/phpinfo.php in your browser.
  2. Search for:
    • upload_max_filesize
    • post_max_size
    • max_execution_time

📌 Important: Delete this file after use. It exposes sensitive server configuration details to the public.

💡 Pro Tip: If you use InstaWP to create development sandboxes, you can pre-configure PHP limits globally using the PHP Config Editor. So you never face this issue mid-project.

As discussed in our blog on how to test WordPress themes and plugins, configuration errors like this are easily avoided when using sandboxed environments like InstaWP.

To resolve the “The link you followed has expired” error, you’ll need to raise your WordPress site’s upload size and execution limits. Below are the 6 most effective methods, each explained with practical steps and how InstaWP users can apply them even faster.

✅ Method 1: Edit the functions.php File

This method directly updates PHP settings from your theme’s functions.php file. It’s useful if you’re already inside the WordPress dashboard and need a quick fix.

Steps:

  1. Navigate to Appearance → Theme File Editor
  2. Select your active theme’s functions.php
  3. Add the following code at the end:

@ini_set( ‘upload_max_filesize’ , ‘128M’ );

@ini_set( ‘post_max_size’, ‘128M’);

@ini_set( ‘max_execution_time’, ‘300’ );

@ini_set( ‘max_input_time’, ‘300’ );

The link you followed has expired
  1. Click Update File

If you’re not using a staging site, you’re at the risk of breaking things on the live site. So, better to create a staging site first. 

✅ Method 2: Modify the .htaccess File

This method works at the server level and is persistent across themes. .htaccess is an Apache configuration file used for setting environment variables like upload size and execution time.

Steps:

  1. Access your site via FTP or File Manager
  2. Go to /public_html and open .htaccess
  3. Add these lines:

php_value upload_max_filesize 128M

php_value post_max_size 128M

php_value max_execution_time 300

php_value max_input_time 300

  1. Save and upload

You don’t need FTP if you’re using the best managed WordPress hosting

✅ Method 3: Create or Edit php.ini

This file sets global PHP settings like memory and upload limits. It’s a powerful method, but it may not work on all shared hosts unless permitted.

Steps:

  1. Create php.ini in your WordPress root
  2. Add:

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 300

max_input_time = 300

  1. Save and upload

InstaWP users can simply go to Site → PHP and use the PHP Config Editor to set these values with no code required. This visual tool eliminates the need to upload custom .ini files manually.

✅ Method 4: Add to wp-config.php

Overview:

This file controls how WordPress behaves. While it doesn’t affect file size directly, it boosts memory allocation, preventing timeouts during uploads.

Steps:

  1. Open wp-config.php
  2. Add:

define(‘WP_MEMORY_LIMIT’, ‘256M’);

  1. Save and re-upload

✅ Method 5: Use a WordPress Plugin 

You can also install a WordPress plugin that allows you to safely insert PHP code snippets without touching theme files. We have a few recommendations for the best WordPress Code snippet plugins for you. Ideal for non-tech users or agencies handing off sites to clients.

Steps:

  1. Install WPCode or a plugin of your choice.
  2. Go to Code Snippets → Add Snippet → Create Your Own
  3. Choose “PHP Snippet” and paste:

@ini_set( ‘upload_max_filesize’ , ‘128M’ );

@ini_set( ‘post_max_size’, ‘128M’);

@ini_set( ‘max_execution_time’, ‘300’ );

@ini_set( ‘max_input_time’, ‘300’ );

The link you followed has expired
  1. Save and Activate

✅ Method 6: Update Your PHP Version

Older PHP versions may not support large uploads or extended processing. Upgrading to PHP 8+ improves performance and compatibility.

Steps:

  • Go to Site → PHP Config 
  • Select the desired PHP version from a dropdown
  • You can also pre-select PHP 8.1+ before launching a sandbox
  • Changes apply instantly—no restart needed

✅ Method 7: Use FTP to Upload Themes or Plugins

If the WordPress dashboard upload is restricted due to low PHP limits, FTP bypasses that entirely.

  1. Install and open FileZilla
  2. Enter your FTP credentials from your hosting provider
  3. Navigate to your WordPress directory:
    • wp-content/themes/ → for themes
    • wp-content/plugins/ → for plugins
  4. Extract your .zip file locally and upload the entire folder
  5. Go back to the WP dashboard
    • Appearance → Themes to activate your theme
    • Plugins → Installed Plugins to activate your plugin

✅ Method 8: Identify Plugin Conflicts

Sometimes, the error is not due to upload size, but due to a plugin misbehaving.

  1. Go to Sites > Manage Sites > Performance Scanner on your InstaWP Dashboard. 
  2. Run a new scan to find any plugin conflicts 
The link you followed has expired
  1. Once you learn about the trouble-causing plugins, go to Bulk Edit > Plugins
The link you followed has expired
  1. Select all and choose Deactivate
  2. Try uploading again
    • If the error disappears, one of the plugins is the culprit
  3. Reactivate plugins one by one while testing uploads after each

The best fix is a proactive setup. Here’s how agencies can harden their workflows against this issue:

1. Set PHP Limits Properly from the Start

Don’t wait for the error. As soon as you spin up a project, set:

  • upload_max_filesize = 128M+
  • post_max_size = 128M+
  • max_execution_time = 300
  • WP_MEMORY_LIMIT = 256M

Choose these values before launching a site using Advanced Site Settings. Or edit them later using the PHP Config Editor and WP Config Editor—no terminal or FTP required.

2. Use Lightweight Themes and Plugins

Avoid uploading bloated themes with large bundled assets (fonts, demos, etc.). Consider lightweight WordPress themes. Compress plugins and themes before uploading or use InstaWP’s Clone Site feature to duplicate a pre-configured template without uploading at all.

3. Keep PHP Updated

Most shared hosts still run PHP 7.4 by default. You should use PHP 8.0+ for modern themes/plugins.

Here is how you can move your WordPress site to a different PHP version

4. Avoid Hosting Limitations

If your client is on ultra-cheap hosting with locked limits, your configuration changes may not apply. So, it’s better to choose cost-effective and scalable managed WordPress hosting where you have:

  • Full root-level access
  • PHP & config file control
  • Version toggling
  • 1-click uploads & snapshots

Once validated, deploy it to the client’s server.

Final Words

Fixing the “The link you followed has expired” error doesn’t have to involve trial-and-error or risky file edits on your production site. Whether you increase PHP limits through configuration files or use safer plugins, the key is knowing your server’s limits and how to control them.

But for WordPress agencies managing multiple sites, there’s a better way.

Ready to fix this error with zero risk?
Launch a site on InstaWP today and test your plugin or theme uploads in a secure, configurable environment—no file limits, no stress.

FAQs

1. How do I fix “The link you followed has expired” error in WordPress?

Increase your PHP upload limits using .htaccess, php.ini, or WPCode. You can also switch to a newer PHP version.

2. What causes this error when uploading a theme or plugin?
It’s usually caused by upload_max_filesize, post_max_size, or max_execution_time limits on your server.

3. Can I fix this without accessing cPanel or FTP?
Yes. Use the WPCode plugin or Site Health info panel to detect and fix issues within the dashboard.

4. Why does the error persist even after increasing limits?
Your hosting provider may override your settings. Consider switching to flexible hosting or testing on InstaWP first.

5. What’s the safest method for agencies handling multiple client sites?
Use a tool like InstaWP to pre-test all uploads and save error-free environments as Snapshots or Templates.



Viewing all articles
Browse latest Browse all 998

Trending Articles