How to Fix WordPress the Link You Followed Has Expired

Posted on

If you are facing a problem where you get an error saying that the link that you followed has expired in WordPress, you do not need to be panic. This error usually happens when we are trying to upload themes and plugins through the WordPress dashboard. How to fix this WordPress error? There are some methods that you are able to follow below.

Increasing the maximum upload size and execution times for your websites is the thing that you can do to fix the ‘link you followed has expired’ error. If you want to do this, it will require you to edit a core WordPress file and copy a few lines of codes. You are able to do it in some different ways. Here are the methods that you can follow. You can try the first method but then if it cannot work, you can try the second method and so on.

It is important for you to note that before you make any changes to the core WordPress files, you have to backup your websites and also make copies of files.

Editing .htaccess File

This is the first method that you are able to try to apply to fix WordPress error which says that the link you followed has expired. You have to edit the .htaccess. But, what is an .htaccess file? It is a core file which is used by WordPress. You are able to edit it and copy the code to change the default upload limits set by WordPress.

You have to access the WordPress files in your server if you want to edit the file. How to access the server using the CPanel? Here, we will guide you to do that. However, you are also able to use an FTP client app.

  • Login to CPanel

If you are not able to find CPanel via your hosting account, you have to type ‘cpanel’ at the end of your website domain name. The example is like this: After that, you have to enter the CPanel username and password. The details are commonly able to be found in the welcome email your hosting provider sends to you.

  • Find And Then Open The File Manager

In the CPanel, you have to find and open the File Manager app. It will bring you where you want to navigate to. There, you have to select to open the public.html folder.

  • Copy The Code

In the public.html folder, there will be the .htaccess file. What do we have to do here? You have to right click on this file and select Edit. After that, you have to copy and paste these lines of code at the end of the .htaccess 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

If you have finished, then you have to click on Save.

Usually, the error can be fixed by this method. However, if it does not work, you are able to try the method below.

Creating A PHP.ini File

To do this method, you are able to follow the steps below.

  • The first thing that you have to do is to open a blank notepad and then you have to copy and paste the lines of code below into it. 

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

After that, do not forget to click on the Save button to save the note file as php.ini and select file type as All Files.

  • Now, you have to upload the file. You have to navigate back to your server and then access the public.html folder. You have to upload the PHP.ini file which you have just made on your PC. It will be able to fix the error and also increase the upload size limits to 64MB.

Making Edits to Functions.php File

If you want to increase the upload limit or maximum execution time, you need to specify your own limits in the functions.php file. Here are the instructions that you have to follow.

  • The first thing that you have to do is to access your site’s functions.php file. How to do that? You have to login into your dashboard and then you have to navigate to Appearance and then Theme Editor.
  • Now, you have to click Theme Functions on the right panel.
  • With the functions.php file opened, you have to copy and paste this code:

@ini_set( ‘upload_max_size’ , ‘120M’ );

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

@ini_set( ‘max_execution_time’, ‘300’ )

  • If you have done so, now you have to click the Update File button.

However, there is a drawback with increasing WordPress limitations through the functions.php file. The functions.php is exclusive to a theme. Therefore, if you changed to a theme which is new, the changes that you made in the functions.php will be lost.

Reasons Of WordPress The Link You Followed Has Expired Error

When you get ‘the link you followed has expired’ error in WordPress, you may be curious about why it can happen. What are the reasons? Why can it happen? The error commonly happens when the file that you are trying to upload is bigger than the default upload and execution limits set by WordPress. So, the best thing that you are able to do to fix it is to increase the default upload limits.

When you try to open the WordPress dashboard and then access the Media and then access Add New page, you will be able to see that by default WordPress has a fixed upload size limit which can prevent you from uploading files of bigger size. These prefixed sizes differ based on the type of plan of the hosting web that you use.

Even though WordPress hosting providers set more than 1000MB as the maximum upload size limit, shared hosting plans which are smaller may be able to limit the size to 25MB. This limit is the thing that keeps you from uploading heavy themes and plugins. Even though your site has limit of upload size which is bigger, if the maximum execution time of your website is limited, then WordPress will often fail to upload bigger files. So, you will face error which says that link you followed has expired.

Leave a Reply

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