{"id":77886,"date":"2023-02-10T10:40:03","date_gmt":"2023-02-10T10:40:03","guid":{"rendered":"\/tutorials\/?p=77886"},"modified":"2025-12-02T15:17:47","modified_gmt":"2025-12-02T15:17:47","slug":"link-you-followed-has-expired-error-wordpress","status":"publish","type":"post","link":"\/ca\/tutorials\/link-you-followed-has-expired-error-wordpress","title":{"rendered":"How to fix \u201cThe Link You Followed Has Expired\u201d Error in WordPress (3 methods)"},"content":{"rendered":"<p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\" target=\"_blank\" rel=\"noopener\">Download all-in-one WordPress cheat sheet<\/a><\/p><p>Error messages may appear in WordPress from time to time, whether it&rsquo;s a database connection error or a critical error.<\/p><p>One common WordPress error message is <strong>The link you followed has expired<\/strong>. Unfortunately, this error message doesn&rsquo;t tell you the cause, and the link only takes you back to the previous page.<\/p><p>This article will explain why the <strong>The link you followed has expired <\/strong>error message occurs and three ways to fix it.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-causes-the-link-you-followed-has-expired-error\">What Causes &ldquo;The Link You Followed Has Expired&rdquo; Error?<\/h2><p>The<strong> The link you followed has expired<\/strong> error often shows up after you upload a theme or plugin that exceeds the file size upload limit. Hosting providers usually have upload size and execution time limits in their PHP settings to improve server performance.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/The-the-link-you-followed-has-expired-error-message.png\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"192\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/The-the-link-you-followed-has-expired-error-message.png\" alt=\"The the link you followed has expired error message\" class=\"wp-image-77888\"  sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/figure><\/div><p>This limitation can hinder you when uploading certain files, themes, or plugins. You can see the current upload limit on your WordPress admin panel via <strong>Media &rarr; Add New<\/strong>.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/WordPress-upload-new-media-panel-with-highlighted-information-of-maximum-upload-file-size.png\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"446\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/WordPress-upload-new-media-panel-with-highlighted-information-of-maximum-upload-file-size.png\" alt=\"WordPress upload new media panel, with highlighted information of maximum upload file size\" class=\"wp-image-77889\"  sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/figure><\/div><p>Note that <strong>The link you followed has expired<\/strong> is not the only error message you may get when uploading large files that exceed the size limit. For example, if you try to upload a media file, you may get the <strong>image.jpg exceeds the maximum upload size for this site<\/strong> error banner.<\/p><h2 class=\"wp-block-heading\" id=\"h-3-ways-to-fix-the-link-you-followed-has-expired-error\">3 Ways to Fix &ldquo;The Link You Followed Has Expired&rdquo; Error<\/h2><p>Fixing the <strong>The link you followed has expired<\/strong> error message requires <a href=\"\/ca\/tutorials\/how-to-increase-the-maximum-file-upload-size-in-wordpress\">increasing the maximum file upload size<\/a>. Let&rsquo;s see three ways to do it.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-increase-limits-in-the-functions-php-file\">1. Increase Limits in the functions.php File<\/h3><p>The first method to fix <strong>The link you followed has expired<\/strong> is by modifying the <strong>functions.php<\/strong> file. This may be the easiest method, as you can edit theme files directly from the WordPress admin area. Follow these steps to do so:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>Appearance &rarr; Theme File Editor<\/strong>. For block theme users, go to <strong>Tools &rarr; Theme File Editor<\/strong>.<\/li>\n\n\n\n<li>You&rsquo;ll see a list of theme files in the right sidebar. Select the <strong>functions.php<\/strong> file.<\/li>\n<\/ol><figure class=\"wp-block-image aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/WordPress-theme-file-editor-interface-with-the-highlighted-theme-functions-option-in-the-right-sidebar.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"724\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/WordPress-theme-file-editor-interface-with-the-highlighted-theme-functions-option-in-the-right-sidebar-1024x724.png\" alt=\"WordPress theme file editor interface, with the highlighted theme functions option in the right sidebar\n\" class=\"wp-image-77891\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><ol class=\"wp-block-list\" start=\"3\">\n<li>Add the following code snippet. Adjust the value of <strong>php_value upload_max_filesize<\/strong> as you like.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">@ini_set( 'upload_max_size' , '120M' );\n@ini_set( 'post_max_size', '120M');\n@ini_set( 'max_execution_time', '300' );<\/pre><ol class=\"wp-block-list\" start=\"4\">\n<li>Scroll down to the bottom and click the <strong>Update File<\/strong> button.<\/li>\n<\/ol><p>You can also access the <strong>functions.php <\/strong>file using an FTP client or the web hosting file manager. Go to <strong>\/public_html\/wp-content\/themes<\/strong> path and open the folder of your currently active theme. Then, open and edit the <strong>functions.php<\/strong> file.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hostinger-file-manager-showing-the-active-theme-directory.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hostinger-file-manager-showing-the-active-theme-directory-1024x469.png\" alt=\"Hostinger file manager showing the active theme directory\" class=\"wp-image-77892\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>Note that this modification only applies to the active theme. If you switch to another WordPress theme, the configurations will revert to the default upload limits.<\/p><p><div><p class=\"important\"><strong>Important!<\/strong> Any update to the theme will delete modifications made to <strong>functions.php<\/strong>. To edit theme files while keeping it up-to-date, consider <a href=\"\/ca\/tutorials\/how-to-create-wordpress-child-theme\">creating a child theme<\/a>.<\/p><\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-2-increase-limits-using-the-htaccess-file\">2. Increase Limits Using the .htaccess File<\/h3><p>The next method is editing the <a href=\"\/ca\/tutorials\/create-default-wordpress-htaccess-file\"><strong>.htaccess<\/strong> file<\/a> &ndash; a hidden file in your website&rsquo;s root directory that allows you to include additional configuration. Follow these steps to increase the file upload size limit through the <strong>.htaccess<\/strong> file.<\/p><ol class=\"wp-block-list\">\n<li>Access your site&rsquo;s <strong>public_html <\/strong>directory via an FTP client or the web hosting file manager. If you use an FTP client like <strong>FileZilla<\/strong>, show hidden files by enabling the <strong>Server &rarr; Force showing hidden files<\/strong> option.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/FileZilla-interface-showing-the-server-drop-down-menu-and-highlighted-force-showing-hidden-files-option.png\"><img loading=\"lazy\" decoding=\"async\" width=\"514\" height=\"205\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/FileZilla-interface-showing-the-server-drop-down-menu-and-highlighted-force-showing-hidden-files-option.png\" alt=\"FileZilla interface showing the server drop-down menu and highlighted force showing hidden files option\" class=\"wp-image-77893\"  sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"2\">\n<li>Find and open the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Add the following code snippet:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">php_value upload_max_filesize 128M\nphp_value post_max_size 128M\nphp_value max_execution_time 300\nphp_value max_input_time 300<\/pre><ol class=\"wp-block-list\" start=\"4\">\n<li>Adjust the value of <strong>php_value upload_max_filesize<\/strong> as you like. For example, if you want to set a <strong>128 MB <\/strong>limit, the line should be <strong>php_value upload_max_filesize 128M<\/strong>. It should look like this:<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/The-content-of-the-.htaccess-file.png\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"445\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/The-content-of-the-.htaccess-file.png\" alt=\"The content of the .htaccess file\" class=\"wp-image-77894\"  sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"5\">\n<li>Save the file and go back to your WordPress dashboard to verify the new upload limit.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-3-increase-limits-in-the-php-ini-file\">3. Increase Limits in the php.ini File<\/h3><p>The last option is to define the <a href=\"\/ca\/tutorials\/php-maximum-upload-size\">maximum file size in the <strong>php.ini<\/strong> file<\/a>. It is the WordPress PHP configuration file that&rsquo;s located in the site&rsquo;s root folder. It allows you to increase <a href=\"\/ca\/tutorials\/wordpress-memory-limit\">PHP memory limit<\/a> and resources.<\/p><p>Unfortunately, most shared hosting plans don&rsquo;t have this file in the <strong>public_html <\/strong>folder. In some cases, it&rsquo;s available, but the hosting provider doesn&rsquo;t let you edit the file. To alleviate this, create a new <strong>php.ini <\/strong>file using a plain text editor and upload it to your hosting account.<\/p><p>In the following steps, we will use Hostinger&rsquo;s hPanel as an example. However, the steps should be similar for other hosting control panels.<\/p><ol class=\"wp-block-list\">\n<li>Log in to hPanel and select <strong>File manager<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hosting-account-dashboard-on-hPanel-with-the-highlighted-file-manager-button.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hosting-account-dashboard-on-hPanel-with-the-highlighted-file-manager-button-1024x545.png\" alt=\"Hosting account dashboard on hPanel with the highlighted file manager button\" class=\"wp-image-77895\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"2\">\n<li>Open the <strong>public_html <\/strong>folder and click <strong>New file <\/strong>in the left sidebar.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hostinger-file-manager-interface-with-the-highlighted-new-file-button.png\"><img loading=\"lazy\" decoding=\"async\" width=\"938\" height=\"496\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/Hostinger-file-manager-interface-with-the-highlighted-new-file-button.png\" alt=\"Hostinger file manager interface with the highlighted new file button\" class=\"wp-image-77896\" style=\"width:840px;height:444px\"  sizes=\"auto, (max-width: 938px) 100vw, 938px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>A pop-up will appear to name the new file. Type <strong>php.ini <\/strong>and click <strong>Create<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/New-file-pop-up-with-php.ini-file-name-written.png\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"242\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/New-file-pop-up-with-php.ini-file-name-written.png\" alt=\"New file pop-up with php.ini file name written\" class=\"wp-image-77897\"  sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>The text editor will open. Copy and paste the following code snippet:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">upload_max_filesize = 128M\npost_max_size = 128M\nmax_execution_time = 300<\/pre><ol class=\"wp-block-list\" start=\"5\">\n<li>Click the <strong>Save<\/strong> button at the top-right corner.<\/li>\n<\/ol><p><div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>Make sure your WordPress site is running the latest PHP version to prevent compatibility issues. Check out our guide on <a href=\"\/ca\/tutorials\/how-to-change-your-php-version\">changing the PHP version<\/a>. <\/p>\n                <\/div>\n\n\n<?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/ca\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner-1024x300.png\" alt=\"\" class=\"wp-image-111781\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>The <strong>The link you followed has expired <\/strong>WordPress<strong> <\/strong>error message is usually triggered by uploading a theme or plugin that exceeds the maximum file size limit. It is one of several errors that are caused by the file size upload limit.<\/p><p>These limits are usually set by WordPress hosting companies. Fortunately, you can easily override or change the configuration using one of the following methods:<\/p><ul class=\"wp-block-list\">\n<li>Add additional code to the theme&rsquo;s <strong>functions.php <\/strong>file. This is the easiest method, as the file is accessible via the WordPress admin area. However, you&rsquo;ll lose the configuration if you switch themes.<\/li>\n\n\n\n<li>Configure the limits via the <strong>.htaccess<\/strong> file. This method is suitable if you want to keep WordPress files unchanged.<\/li>\n\n\n\n<li>Create a <strong>php.ini <\/strong>file in the root directory. This method lets you include an additional PHP configuration that increases the file size limit.<\/li>\n<\/ul><p>If you are unsure about modifying these files, create backups first. So if anything goes wrong when you <a href=\"\/ca\/tutorials\/debug-wordpress\">debug WordPress<\/a>, use the backup files to revert to the website&rsquo;s previous configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error messages may appear in WordPress from time to time, whether it&rsquo;s a database connection error or a critical error. One common WordPress error message is The link you followed has expired. Unfortunately, this error message doesn&rsquo;t tell you the cause, and the link only takes you back to the previous page. This article will [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ca\/tutorials\/link-you-followed-has-expired-error-wordpress\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":172,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Fix the Link You Followed Has Expired (3 Methods)","rank_math_description":"To fix \u201cthe link you followed has expired\u201d error, increase limits through code snippets. Check this article to learn more about fixing this error.","rank_math_focus_keyword":"the link you followed has expired","footnotes":""},"categories":[22695,22692],"tags":[],"class_list":["post-77886","post","type-post","status-publish","format-standard","hentry","category-security-and-maintenance","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-fix-the-link-you-followed-has-expired-error-in-wordpress-3-methods","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-fix-the-link-you-followed-has-expired-error-in-wordpress-3-methods","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/link-you-followed-has-expired-error-wordpress","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/77886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/users\/172"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/comments?post=77886"}],"version-history":[{"count":10,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/77886\/revisions"}],"predecessor-version":[{"id":137965,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/posts\/77886\/revisions\/137965"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/media?parent=77886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/categories?post=77886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ca\/tutorials\/wp-json\/wp\/v2\/tags?post=77886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}