We’re guessing that you’ve just gotten told by WordPress that the link you followed has expired... While this can be extremely frustrating, worry not, this is a common WordPress error and we can help you fix it.

This article will discuss why ‘The link you followed has expired’ error occurs and how to fix this error on your own. 

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

The WordPress site admin area has a pre-set upload size limit set by your hosting company. The size limit is set to avoid large size uploads which can slow down your site’s speed and overall performance. The set size also depends on the type of hosting you are on and the space it comes with. 

“The link you followed has expired” error occurs when you upload themes and plugins that exceed this set size.   

How to fix the expired link error?

There are three different ways to fix this error. We will go into detail on each approach to best help you solve this issue. 

1. Increase size limit in functions.php file

Please note, this method can work indefinitely only if you don't change your current theme. If you change the theme, the set changes will revert and you’d have to set them again. 

Alternatively, you can create a child theme and add the functions.php file there. This way, your changes won’t be overridden. 

To increase the size limit in functions, follow these steps.

  • Login to your WordPress server via Cpanel or FTP client 
  • Look for the file manager and click it
  • Inside the file manager look for the root directory named public_html
  • Inside your publich_html file go to /wp-content/themes/your-theme-folder/php function.

php function

  • Simply add the following code to your WordPress theme’s functions.php file and save.

 

 

 

@ini_set( 'upload_max_size' , '120M' );

@ini_set( 'post_max_size', '120M');

@ini_set( 'max_execution_time', '300' );

The max value you set will depend on the size of your uploads. Make sure that you set a sufficient value but also don’t go overboard. Stick with what you need. The max execution time should also be enough for your uploads. A good rule of thumb is to double the time. 

After you’re done uploading your theme or plugin, change the set amount back to the previous value. This is advised because keeping a high value can open the door for hackers to upload files to your site.

2. Increase size limits in . htaccess file

For this method too, you have to login to your WordPress site server. 

  • Login to your WordPress server via Cpanel or FTP client 
  • Look for the file manager and click it
  • Inside the file manager look for the root directory named public_html
  • Inside your publich_html file, locate the . htaccess file 
  • Right click to edit in the code below at the bottom of the file

edit htaccess

 

 

 

 

php_value upload_max_filesize 128M

php_value post_max_size 128M

php_value max_execution_time 300

php_value max_input_time 300

Please note, you should edit these changes  at the end of the file where #END Wordpress line is.  Placing them in the middle may interfere with another setting in the file.

If you are using an FTP client to complete this process you may need to enable the htaccess option inside the file manager. Do this by clicking the ‘settings’ button on the top right of the file manager and then selecting “show hidden files (dotfiles)”. 

Remember to save changes when you are done.

3. Increase size limits in php.ini file

Similar to the first solution, this method has some limitations. For anyone using shared hosting, the php.ini file will probably be missing. 

For anyone not using the shared hosting, you need to access your WordPress server via Cpanel or FTP client to increase the size limits via the php.ini configuration file. 

  • Login to your WordPress server via Cpanel or FTP client 
  • Look for the software section and click ‘Select PHP version’ 
  • Click the ‘Switch to PHP options’ button on your top right
  • Edit in the following code in you php.ini file

 

 

 

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 300

Once you’re finished, left-click anywhere outside the dropbox. If this action shows a green message box confirming the changes then all is well. If it is still showing you an error then please feel free to contact us for further support at the bottom of this page.

Conclusion

Unfortunately, this link error can be quite frustrating and take a little bit of time to increase the pre-set size limits appropriately. We hope that one of these three solutions has fixed the issue and that now you can continue on with fully working links. 

If however, none of the above solutions helped solve your ‘the link you followed has expired error’ - please don’t despair. Our expert WordPress developers are always available to help you through our Emergency WordPress help. Get in touch.