How to fix “The link you followed has expired” in WordPress?

Updated on

How to fix "The link you followed has expired" in WordPress?

Are you seeing the error “The link you followed has expired” in WordPress? This error does not give many clues about what is really wrong, which is why beginners find it a bit difficult to solve. In this article, we will show you how to fix the link you followed has expired wordpress error along with causes and how to avoid it in the future.

In most cases, this error usually appears when we upload a new theme or plugin from the WordPress admin panel. And, as a general rule, hosting provider companies have restrictions on each of the hosting service to make everything more secure, especially in shared hosting.

If your WordPress site is hosted on a shared web hosting, it is likely that you may encounter the error message that indicates that the allowed memory size has run out or the link you followed has expired’ errors.

Think of shared hosting as a building with neighbors. Each of the floors would be an accommodation space, right? Now imagine that there is a very, very loud neighbor who does not let anyone sleep at night because he is always organizing parties. Ideally, the community should have a rule which would not allow noise to be made later than 12 at night to resolve the matter.

Well, the restrictions on hosting are somewhat similar. These are rules imposed on the machine to improve the safety and good user coexistence.

Other Similar WordPress Errors you might want to read:

What Causes ‘The Link You Followed Has Expired’ Error?

WordPress hosting companies have a configuration that controls the size of the files that you can upload from within the WordPress administration area. They also have a configuration that prevents scripts from running too long.

Well, these restrictions are what usually causes the error “The link you have followed has expired.”

 fix ‘The Link You Followed Has Expired’ Error wordpress

One of these restrictions controls the maximum size of the files that you can upload from the WordPress admin panel. Another one that also affects this error is the time that a script can be running on the machine. As we said before, these restrictions make your website more secure and improve overall server performance.

If you want to check the maximum file size that you can upload in the WordPress dashboard you can go to Media> Add new. At the bottom of that page, you can see it.

The Link You Followed Has Expired’ wordpress Error

If this restriction is too low, it is common to see errors such as out of memory or maximum execution time, but this is not the case with plugins and themes. When you exceed these limits by uploading plugins and themes in the admin panel of your WordPress you will see the error «The link you have followed has expired».

Another cause of this wordpress error is “Time Out”. In case, there is a time lag in between adding/editing a blog post/page, of more than 15 minutes and your internet connection is too slow, wordpress is unable to autosave your instance. This may also cause this error to pop up when you try to save the page/post.

Knowing this, let’s see how to solve this mess.

How To Fix The Error “The Link You Followed Has Expired”?

As you have deduced, the easiest way to solve this error is to increase the values ​​of these restrictions. The restrictions that come into play in this error are the maximum file size, the PHP memory limit and the maximum execution time.

Now that we have clear the protagonists of the error and what to do to solve it, let’s get to work.

There are many ways to do it. In this article, we are going to show you the simplest and most effective. Of course, if none of these ways works for you, check with the technical support of your hosting service to help you modify these parameters.

Note: We must always make sure to take a backup copy of the file that we are going to modify. This way we will be safe in case something goes wrong since we can always restore the copy. And, when it comes to editing a file, we have to be very sure of what we want to do, since, any mistake, can make our website to display an error or stop working.

Increase limit via functions.php file

This method is the easiest to carry out. On the other hand, every time you change the subject in your WordPress installation, you will have to do it again.

All you have to do is add this code in the functions.php file of the theme that you currently have active in your web project developed with WordPress.

  • @ini_set( ‘upload_max_size’ , ‘120M’ );
  • @ini_set( ‘post_max_size’, ‘120M’);
  • @ini_set( ‘max_execution_time’, ‘300’ );

Do not forget to increase the values ​​of upload_max_size and post_max_size until you reach the weight of the theme or plugin you are trying to upload.

You will also have to increase the max_execution_time until the time you think it would take to publish/edit a blog post or upload a file to the server. If you are not sure, try doubling the value.

Increase limit via .htaccess file

If you cannot locate .htaccess file in your WordPress installation. WordPress generates an htaccess file for the first time when you configure permanent links in Settings> Permanent links.

All you need to do is click on the Save Changes button and WordPress will automatically generate an htaccess file in the root directory of your installation.

If you don’t want to add code in your theme’s functions.php file, you can try it with .htaccess file. To access this file you must have an FTP client.


Once the file is open, add these lines of code:

  • php_value upload_max_filesize 128M
  • php_value post_max_size 128M
  • php_value max_execution_time 300
  • php_value max_input_time 300

Edit the .htaccess from Cpanel

Here, we explain how to edit .htaccess from your Cpanel. This tutorial assumes that you are inside your Cpanel.

To edit your .htaccess you must do the following:

  1. In your Cpanel, you must go to file management
  2. Select the WebRoot option (public_html/www)
  3. Select the Show Hidden Files option (dotfiles: example).
  4. Click Go.
  5. Now inside the public_HTML, we will see a file called .htaccess. If not, you can create it by clicking on a new file and enter the name .htaccess and click on create a new file
  6. Then right-click on .htaccess file and select the edit option and confirm by clicking on edit again.
  7. After we make the necessary changes then we must click on save changes.

Do not forget to adjust the aforementioned values ​​to your needs and re-upload the file to your website with the changes made.

Increase limit via .htaccess file

Create/Modify PHP.ini File

The php.ini file is a configuration file used by PHP and WordPress. You need to connect to your project using an FTP client and then look for the php.ini file in the root folder of your website.

If you have a Shared hosting, it is very likely that you do not see this file. In that case, you have to create a blank php.ini file with a plain text editor such as Notepad and upload it to the root of your website.

We can check the limits of php (and many other things) with the command phpinfo (). Just add a php file on your hosting with the following lines:










The page will show you a lot of information including the version of php used (php5 at home, the php7 transition is planned), the server used (apache or nginx), the location of the configuration files.

Now edit the php.ini file and add the following code with the value:

  1. Loaded Configuration File: /etc/php5/apache2/php.ini (or /etc/php5/fpm/php.ini on another)
  2. upload_max_filesize: 2 M
  3. post_max_size: 8 M
  4. max_execution_time: 30
  5. max_input_time: 60
  6. memory_limit: 128 M

In 1 we find the location of the php.ini file (which will be modified later), then the size limit of uploaded files and data sent by a form. This is indicated in M ​​(MB) or G (GB)

In 4 and 5 it is the duration (in seconds) of maximum execution of the scripts. and lastly, the maximum memory used.

You should update both .htaccess file and php.ini file:


php_value memory_limit 256

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 1000


memory_limit = 256M

upload_max_size = 64M

post_max_size = 64M

upload_max_filesize = 64M

max_execution_time = 300

max_input_time = 1000

Note: Do not forget to adjust the values ​​to your needs and upload the file with the changes made. Make sure to delete your phpinfo file when you no longer use it. Especially, if you gave it this very special name: it’s useless to leave it in the sight of potential hackers who could draw information.


Change PHP version from cPanel

Currently, available PHP versions range from 4.4 to the latest PHP version, 7.0, 7.1 or with 7.2. An old version of PHP can lead to “The link you followed has expired” warning message. You can fix it by changing it to the latest version. If you don’t know how to change the PHP version, follow the instructions.

To choose a version of PHP different from the one installed by default on the web hosting server you must enter cPanel and follow the steps below:

  1. Login to cPanel with your username and password; Then enter the Select PHP Version option as shown in the following image.
  1. Click on the combo box to change the version of PHP currently used. Clicking will display the list of available versions to use in your web hosting account.

  1. To change the PHP version simply select the one you want to use and save the changes

From the same screen, you can also enable/disable PHP extensions like file info, zip, and so on.

 The link you followed has expired_ While uploading WordPress Themes

If you click on Switch To PHP Options, you will see a set of different variables that you can modify. From there, you can edit variables like: max_input_vars, allow_url_fopen, memory_limit, and others.

Then click on “Show PHP Settings” to configure PHP from there you can now choose some parameters like:

  • max_execustion_time
  • max_input_time
  • memory_limit
  • post_max_size
  • upload_max_filesize

Just click on a value to modify it and click on “Apply”. Once you have everything configured, click on “save”. Now go back to the theme admin panel. From there reupload the theme which showed “The link you followed has expired” error message.

To conclude

These methods should help you solve the problem and allow you to download larger themes and plugins via the WordPress dashboard.

However, some shared hosting providers may have restrictions that will prevent you from downloading large files. If the problem persists, contact your web hosting provider and ask for their help.

Now you can try to re-upload the plugin, a file, edit the post or the topic that was causing you the error “The link you have followed has expired” to see if it has been fixed.

In the future, use an FTP client application, such as Filezilla to access your server directly and upload themes and plug-ins using the FTP client.

We hope this article has helped you solve the error of exceeding the maximum execution time exceeded in WordPress. You can also see our WordPress security guide to fix common vulnerabilities in WordPress.

In case, you need our help fixing this error. Please contact us below or get in touch via Facebook.

Other Useful Articles