Site icon WP 301 Redirects

Guide: Fix “The Link You Followed Has Expired” Error in WordPress

One of the more frustrating errors that WordPress users may encounter is the message: “The link you followed has expired.” This issue usually arises during file uploads or theme/plugin installations. While it may seem alarming at first, the good news is that it’s relatively easy to solve once you understand what causes it.

This article explores what triggers this error in WordPress, various methods to fix it, and includes a helpful FAQ at the end. Whether you’re a beginner or a seasoned developer, this guide will help you get past this obstacle with ease.

What Causes the “The Link You Followed Has Expired” Error?

The error appears primarily due to PHP settings on your web server that limit file upload sizes and script execution times. WordPress installs themes, plugins, and uploads media files through HTTP requests, and if these requests exceed the maximum limits, the process fails.

The key PHP settings involved are:

When any of these limits are too low, particularly during theme or plugin installation, WordPress is unable to complete the process, resulting in the “The link you followed has expired” error.

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

There are several ways to fix this issue by increasing the relevant PHP limits. Below are the most effective solutions:

1. Update PHP Limits via php.ini

If you have access to your site’s php.ini file (typically available on VPS or dedicated hosting), follow these steps:

  1. Navigate to your root WordPress directory.
  2. Locate or create a php.ini file in the directory.
  3. Add or update the following lines:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

These lines increase the file upload limit and script execution time, resolving the error in most situations.

2. Modify .htaccess File

If you’re using Apache as your web server, you can add those same settings to your .htaccess file:

  1. Open the .htaccess file located in your site’s root directory.
  2. Add the following lines at 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 and reload your website. Check if the issue is resolved when you try uploading your theme, plugin, or media.

3. Edit the functions.php File

Another user-friendly method is to define limits in your WordPress theme’s functions.php file. Here’s how:

  1. Go to Appearance > Theme Editor in your WordPress dashboard.
  2. Select the functions.php file of your active theme.
  3. Add the following code at the end of the file:
@ini_set('upload_max_size', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');

This method is ideal if you don’t have access to the server-side configuration files like php.ini or .htaccess. However, it’s not a permanent solution because switching themes will remove the changes.

4. Adjust Settings via cPanel

If you’re hosting your site on a platform that provides cPanel access, such as Bluehost or HostGator, you can increase the PHP limits through the control panel:

  1. Login to your cPanel dashboard.
  2. Scroll down to the Software section and click on MultiPHP INI Editor or PHP Configuration.
  3. Select your domain and update the following fields:

Click Apply or Save to implement changes.

5. Use a Plugin

For users who are not comfortable editing code, WordPress plugins like WP Increase Upload Filesize or WP Maximum Execution Time Exceeded can simplify the process. Install and activate a plugin of your choice and follow the on-screen instructions to modify the necessary limits.

This approach is simple, especially for beginners, but it may not work on all hosting platforms due to server-side restrictions.

Best Practices to Avoid This Error

Conclusion

While encountering the “The link you followed has expired” error in WordPress can be frustrating, it’s usually easy to fix by adjusting a few PHP configuration settings. Whether you prefer editing configuration files, using cPanel, or installing a plugin, there’s a solution tailored to your level of expertise.

Understanding what causes this error and knowing how to prevent it will not only save you time but also enhance your overall WordPress experience.

FAQ

What does “The link you followed has expired” in WordPress mean?

This error usually occurs when the file being uploaded exceeds the server’s PHP limits, such as maximum file size or execution time.

Can I increase PHP limits without accessing server files?

Yes, you can use a plugin or your theme’s functions.php file to increase limits. However, these methods might be limited by your hosting provider’s restrictions.

Why do I still see the error after making changes?

Ensure you’ve cleared your browser and site cache, and verify that the changes were applied correctly. You may also need to check with your host if your edits are not taking effect.

Is it safe to modify the .htaccess or php.ini file?

Yes, but proceed with caution. Always make backups before making any changes to core configuration files.

Can this error be caused by plugins?

Indirectly, yes. A plugin trying to upload large data or files can trigger this error if PHP limits are restrictive.

Exit mobile version