Web Server

Fix WordPress Error “The Link You Followed Has Expired”


This WordPress error is not new to people that regularly work on WordPress themes. The good news is that it’s an error that has a solution that can easily be implemented. This error does not give a complete description of the exact problem. This can be challenging for any rookie on WordPress to fix quickly. This issue may be caused a time due to the file upload limit that existed or was defined. I will be showing you different ways to resolve this issue. Though some will require you to change some lines of code, you do not need to be a professional developer before you can do this because it’s simple and direct. In this article, you will learn how to fix WordPress Error “The Link You Followed Has Expired”.

If you want to read more on WordPress check these posts: How to Install and Configure WordPress on Your Windows Computer Using WAMP SERVER, How to Install and Setup WordPress into a cPanel and Configure Your First WordPress Theme, Integrate a WordPress site with WP Telegram, How to fix WordPress error: There has been a critical error on this website, please check your site admin email inbox for instructions

The below shows the response you get when an issue exists. Here are some exciting articles: WordPress site on Azure: How to create a website hosted in Azure, Deploy WordPress on Azure App Service: How to install MySQL, and Part 1: SimpleSAMLphp Setup on Windows Serve.


1. Open the functions.php File to fix the Link you followed has expired. This file exists on every WordPress theme and it’s editable. But note that once you change your theme any changes you make on the file will return to default. This is a good approach to use if you do not change the theme regularly. To resolve this issue, locate and edit the functions.php file.


and paste the following code into it:

@ini_set( 'upload_max_size' , '100M' );
@ini_set( 'post_max_size', '100M');
@ini_set( 'max_execution_time', '350' );

Confirm you change upload_max_size, post_max_size and max-execution-time values to the exact sizes that will allow for a file to be uploaded.

Save the changes to the file and check if the error still pops out.


Recommendation for changing functions.php file

  1. The first recommendation is that you should use low values but try to increase the values just to correct the error.
  2. The second recommendation is to have a shorter execution time and a smaller upload size. A hacker will find it difficult to upload large files to cause havoc to the WordPress website.

2. Open the .htaccess File.

The .htaccess file is used for web server configuration. Locate the .htaccess file in the root folder or the public_html directory for your website files.


Open the file with an editor and paste the following lines of code before the line with # BEGIN WordPress  or # END WordPress, save the file after pasting.

php_value upload_max_filesize 120M
php_value post_max_size 120M
php_value max_execution_time 300
php_value max_input_time 300

This is the best option if you change your theme regularly and as earlier recommended only change this value when u need to fix this type of error.

In case the above steps did not work then you can use the php.ini file. This file is a PHP and WordPress configuration file. This file is located on the server in the /public_html folder or the root folder. But if you are on a shared hosting server then you will not see this file.

The image below shows where the php.ini file is located on a local WAMP Server


The image below shows where the php.ini file is located on a local XAMPP Server


If this file already existed on your hosting server that is not shared just edit it but if it does not exist, then you need to create a blank php.ini file in your website’s root directory using a text editor like Notepad or Notepad++. After the creation of this file, you can paste the following code into it:

upload_max_filesize = 150M
post_max_size = 150M
max_execution_time = 350

4. Update your PHP Version

Another major cause of this issue is when you are using an outdated PHP version. PHP has regularly been updated and it is very easy to update your current PHP version. Just navigate to your cPanel PHP manager like the image below and open it.


You will be surprised to see your current PHP Version with a Deprecation warning.

What is Deprecation?

Deprecation means there is no longer official support for a software version but encourages the use of a newer or better version. The image below shows the different PHP Versions that are no longer supported.


Please note that this deprecated version will still works well with your old WordPress theme the issue is that it will give errors with newer versions of the WordPress themes and Plugins. Another danger these deprecated versions can cause is security problems if care is not taken.

If you are using a modern WordPress Theme, it is recommended you use the latest PHP version.

The image below still shows all the websites are currently using a deprecated PHP Version 7.4 and need to be updated immediately.


Updating PHP Version

In the PHP Version dropdown select the newer version and click on Apply button, immediately you will receive a success message of the new PHP version.

The image below now shows the PHP Version now updated to the latest version of PHP 8.1


After the update, you can now reconfirm if the issue of “The Link You Followed Has Expired” still occurs. The PHP update may be the lasting solution to the problem.

5. Debugging WordPress Error

Running your WordPress in Debug Mode can fix a lot of issues that are not clear to you. All you need to do is access the cPanel and open the public_html directory. Then, open the WordPress configuration file called wp-config.php using the edit button. Search for WP_DEBUG and change the false to true.


6. Check for conflicts in the installed plugins.

This issue can also be because of conflicts in the installed plugins and once discovered then you need to uninstall the plugin.

7. Report back to your Hosting Provider.

After trying all these steps and the issue still exists it is recommended you contact your hosting provider.

I hope you found this blog post fix WordPress Error “The Link You Followed Has Expired” Interesting and helpful. In case you have any questions do not hesitate to ask in the comment section. Kindly refer to this YouTube video below for more information.

Fix WordPress Error “The Link You Followed Has Expired”

Summary on fixing WordPress Error “The Link You Followed Has Expired

Having followed the above steps, the WordPress Error “The Link You Followed Has Expired has been resolved. if you are having issues resolving this in your environment, please let me know in the comment section.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x