How to Fix ‘The link you followed has expired’ Error in WordPress

Introduction If you are a website owner, do you sometimes get the error ‘The link you followed has expired’? Do you feel annoyed when this error occurs while you are editing or configuring your website? Don’t worry, because we will…

How to fix 'The link you followed has expired' Error in Wordpress

Introduction

If you are a website owner, do you sometimes get the error ‘The link you followed has expired’? Do you feel annoyed when this error occurs while you are editing or configuring your website? Don’t worry, because we will show you some useful methods to help fix ‘The link you followed has expired’ Error.

fix the link you followed has expired error 1

The question is: what causes this error? In fact, WordPress hosting companies use settings that limit the size of files you can upload in the admin area. Additionally, they also have a setting that prevents scripts from running for too long. This makes your website more secure and improves the overall performance of your hosting server.

If you want to see the file upload size limit, go to Media -> Add New. Now you can see the maximum upload file size like the following image.

fix the link you followed has expired error 2

Whenever you upload a file that is larger than the size limit, or a script takes longer than the time limit, errors like ‘memory exhausted’ or ‘maximum execution time exceeded’ will occur. In particular, the error ‘The link you followed has expired’ will appear when you try to upload a plugin or theme.

To help you solve this problem, today’s blog introduces 3 ways to fix this error. Let’s get started now.

Increase the size in functions.php file

This is considered a fairly easy and effective method. All you need to do is go to your theme’s functions.php file and add the code below:

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

You can change the values of upload_max_size and post_max_size so that they are larger than the file you want to upload. Moreover, max_execution_time should be increased to the time you think the upload will need.

However, there is a caveat when using this method. Whenever you change the WordPress theme, the file size limit will revert to the old value.

Raise the limit in the .htaccess file

Another way for you to increase the size of the uploaded file is by adding code to the .htaccess file. With this method, you have to use an FTP client or the file manager to customize the .htaccess file.

Now, at the bottom of the .htaccess file, add the code 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

After adding the code, you need to save all your changes and upload this file back to your WordPress site.

Expand the limit with the php.ini file

First of all, you need to connect to your website with an FTP client. Then, in the root folder of your site, find the php.ini file.

If you can’t find this file, you probably don’t have one. In that case, you need to create a php.ini file by utilizing a plain text editor, such as Notepad. After that, don’t forget to upload it to your WordPress site.

The next step is to edit the php.ini file and add the following code:

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Finally, save it and upload this file back to your site.

Now, you can check whether the error still appears by uploading a new theme or plugin file.

Ending thoughts

In conclusion, with the 3 methods that we have provided today, we hope that you are able to fix ‘The link you followed has expired’ Error smoothly. In addition, don’t forget to share it with your friends if you find it helpful. Last but not least, if you intend to use a new theme for your site, don’t hesitate to visit our Free WordPress Themes.

Build it with a template

Start from a finished design: Joomla templates, WordPress themes or the AI-ready block themes. Every template has a free version and a live demo.

Stuck on a template?

Pro customers can open a ticket; everyone can read the documentation.

Free download

We'll send the link, setup tips and update notices, and you can reach us anytime through our AI assistant and contact form.

The download starts at once. We email you the link and ask you to confirm your address. Privacy policy.