The link you have followed has expired

This error usually occurs when you are trying to upload a WordPress theme or a plugin to your website from the WordPress admin area.

You will see a message saying, “The link you followed has expired. Please try again”.

WordPress hosting companies have a setting that controls the size of files you can upload inside the WordPress admin area. They also have a setting that stops scripts from running too long.

You can see the file size upload limit by visiting the Media → Add New page.

These restrictions make your website safer and improve the overall performance of your WordPress hosting server.

If these settings are too low, or you are trying to upload a larger file, then you will see errors like the memory exhausted error or the maximum execution time exceeded error.

However, if you are trying to upload a WordPress theme or plugin, then you will see “The link you followed has expired”.

Increasing Limits Using PHP

For this method, you will need to edit the wp-config.php file by using an FTP client or the File Manager app in cPanel.

Simply connect to your website using FTP and edit the wp-config.php file in the root of your WordPress site folder and add the following code snippet:

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

Save changes and upload the file back to your website.

Increasing Limits in the .htaccess File

For this method, you will need to edit the .htaccess file by using an FTP client or the File Manager app in cPanel.

Simply connect to your website using FTP and edit the .htaccess file in the root of your WordPress site folder and add the following code snippet at the bottom of the file:

php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Save changes and upload the file back to your website.

Increasing Limits in the php.ini File

The php.ini file is a configuration file used by PHP and WordPress. You will need to connect to your WordPress site using an FTP client and look for the php.ini file in your site’s root folder.

Most users are on a shared hosting account, so they may not find this file in their site’s root folder. In that case, you will need to create a blank php.ini file using a plain text editor like Notepad and upload it to your website.

Now, edit the php.ini file and add the following code inside it.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Save changes and upload the file back to your website.

You can now visit your website and try to upload the theme or plugin file again. The error should disappear, and you should be able to upload the file.

If it doesn’t, then try to increase file limits to match the file size you are trying to upload. Otherwise, you may need to contact your WordPress hosting provider to see if the problem is on their end.

Was this page helpful?