Overcoming the ‘The Link You Followed Has Expired’ Error in WordPress

Ah, WordPress. It’s a fantastic platform for building websites, but sometimes, it throws a curveball that can leave you scratching your head. One such curveball is the “The Link You Followed Has Expired” error. This particular error often pops up when you’re trying to install or upload a plugin, theme, or media file, and things don’t go as planned.

The error message, despite its ominous wording, typically signals a much less dramatic issue: you’re trying to upload a file that’s bigger than the current limits set by your WordPress hosting environment. These limits are there to keep your website fast and secure but can sometimes be a bit too restrictive, especially if you’re working with large files.

You can easily spot your site’s current limits by heading to the Media section in your WordPress dashboard and checking the “Maximum upload file size” listed there. If your file exceeds this limit, WordPress will throw up its hands and show you the dreaded expired link message.

Variations of the issue

This error doesn’t always manifest in the same way. Depending on your setup, the error message might vary slightly. However, the core issue remains the same: a file is too large based on the restrictions set by your server.

"the link you followed has expired" error as shown on a WordPress site with a link that says Please try again.

Some variations you might encounter include different wording on the error page or encountering this issue while uploading different types of files, not just themes or plugins.

Reasons why this error occurs

The primary reason for this error is quite straightforward: your file size exceeds the upload limit. But there’s a bit more to it. Web hosts set these limits to ensure that the server remains stable and performs well for all users. If everyone uploaded huge files willy-nilly, servers could slow to a crawl or become unresponsive.

However, these limits aren’t just about file size. They also involve the maximum execution time, which determines how long your server will try to perform a task before giving up. If a large file upload fails to finish within this time frame, you’ll run into our pesky error.

You can easily find the maximum upload size in the WordPress admin. Head over to Media > Add new media file and look for the file size listed under the upload box.

Checking the maximum upload file size in the WordPress admin to troubleshoot the the link you followed has expired error.

Encountering the “The Link You Followed Has Expired” error can be a real hiccup when you’re cruising through your WordPress site’s admin area, especially when you’re trying to upload a file or install a new theme/plugin. Fortunately, this common snag is fixable with a few adjustments here and there.

Before you begin

Most solutions for this error involve increasing the maximum upload and post sizes. While increasing these limits can help you avoid the error, setting them too high can have drawbacks.

A super high limit can slow down your site, make the backend less responsive, and potentially open doors for malicious uploads. It’s all about finding the right balance that works for your site’s performance and security.

Last but not least, make sure you have a recent backup on hand before making changes to your site.

Option 1: Use functions.php

The `functions.php` file in your WordPress theme allows you to define certain settings that affect the limits on file upload size, post max size, and execution time.

Adjusting the max upload file size and execution time to troubleshoot the the link you followed has expired error.

By tweaking these values, you can effectively bypass the restrictions that lead to the “link has expired” error.

This is a quick fix, but remember, if you update your theme, you’ll need to add the code again unless you’re using a child theme.

  1. Go to your WordPress dashboard, and click on “Appearance” > “Theme File Editor”.
    Appearance, Theme File Editor in the WordPress admin displaying the theme's functions.php file.
  2. On the right-hand side, you’ll find a link labeled “Theme Functions” or `functions.php`. Click on it.
  3. Scroll through the file until you find a suitable place to insert the following code snippet:
    @ini_set( 'upload_max_size' , '64M' );
    @ini_set( 'post_max_size', '64M');
    @ini_set( 'max_execution_time', '300' );
  4. This code adjusts the maximum upload size, post size, and execution time to avoid the error.
  5. After inserting the code, click on “Update File”. This should resolve the error.

Important note: Remember, updating or changing your theme could wipe out these customizations. Using a child theme can prevent this by preserving your changes regardless of updates.

Option 2: Use .htaccess

This method involves accessing your website files and adding a few lines that direct your server to accept larger files and take its sweet time doing so.

Adjusting the max upload file size and execution time in the htaccess file to troubleshoot the the link you followed has expired error.

The `.htaccess` file controls the high-level configuration of your site on Apache servers. By customizing this file, you’re directly instructing the server to increase the limits that are causing your error.

  1. Navigate to your WordPress site’s root directory using an FTP client or your hosting provider’s cPanel/File Manager.
  2. Locate `.htaccess` in the root folder. If it’s hidden, you might need to enable “Show Hidden Files” in your file manager settings.Locating the htaccess file in an ftp client.
  3. Add the following lines at the end of the file:
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300
  4. Upload the modified `.htaccess` file back to the server. Then, try to replicate the action that caused the error to see if it’s resolved.

Note for 10Web customers: 10Web’s Nginx servers do not use a `.htaccess` file, so this method won’t apply. Instead, consider the `functions.php` or `php.ini` methods.

Option 3: Use php.ini

The php.ini file is the primary configuration file for PHP. If you have access to your server’s php.ini file, you can increase upload limits and execution times directly at the PHP level, which can resolve the error.

php.ini file with settings to increase the max upload size and execution time to troubleshoot the Adjusting the max upload file size and execution time the link you followed has expired error.

However, not all hosting environments allow you to modify this file directly, so this method might not be available to everyone.

  1. As before, you should use an FTP client or your hosting provider’s interface to access the root directory.
  2. If `php.ini` isn’t present or editable, create a new file named `php.ini` in the root directory.
  3. Add or edit the following lines to reflect the new limits:
    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300

  4. After adjusting the values, save the file and upload it back to the root directory. Then, check if the issue is resolved by attempting to upload a file again.

Option 4: Check for plugin conflicts

Sometimes, the error is not about file size limits but rather a conflict between plugins. Identifying and resolving these conflicts can eliminate the error.

  1. From your WordPress dashboard, deactivate all plugins temporarily.
  2. Reactivate them one by one, checking each time if the error reappears. This process helps pinpoint the problematic plugin(s).
  3. Once identified, you may need to choose between keeping that plugin disabled, rolling back an update, or waiting for a bug fix from the plugin developer.

In summary

Encountering the “The Link You Followed Has Expired” error in WordPress can be frustrating, but it’s often a simple fix away from being resolved. Whether it’s tweaking a few settings or dealing with a plugin issue, the solutions are within reach. Just remember to back up your site before making any changes, and you’ll navigate through this WordPress hiccup with ease.

Share article

Leave a comment

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

Your email address will never be published or shared. Required fields are marked *


Name *