I recently got an error message saying that “The link you followed has expired”. This happened as I was installing a new theme on my local development environment. While googling the problem I found out that many others had the same problem.
In this article, I explain what causes the problem and how to fix it.
The case of expired link error
I first noticed this error in my local development environment (I’m using MAMP). Never seen it before and it appeared after I installed a new version of MAMP. Everything worked well in environment till I tried to install a theme I bought from Themeforest. The theme installation file is 17MB of size and I have never had problems installing this theme in any other environment. So I had no idea why this was happening.
The error appeared when I tried to upload a theme file to my WordPress site. Going to Appearance – Themes – Add new and then select the theme file for upload always ended with the error. And it happened very fast, like immediately after starting the upload.
Solution to the problem of “the link you followed has expired”
It appeared that the reason for all this was MAMP settings. The new MAMP installation with default settings had too small values for file upload size. Also, the max execution time was quite low as well as post maximum size. I’m not sure if the maximum post size has anything to do with this but I changed it anyway to a bigger value. So – the reason for this error is too small values for certain values. Change them to
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
These values are set in php.ini configuration file. In this case, MAMP, it is the file located in
How do you know which configuration file to edit?
The easiest method is to check your phpinfo. Go to your MAMP and select “Open WebStart page”. At the top of the page, there is a heading PHP and underneath of that is a link to phpinfo. Click the link and you’ll get a page full of information about your PHP environment. Quite high at the top is info about the loaded configuration file. To edit the values, open the file and change the above-mentioned values.
Start the servers again and you’ll be good.