a:3:{i:0;a:24:{s:2:"id";i:1037322;s:4:"date";s:19:"2022-04-01T11:47:38";s:8:"date_gmt";s:19:"2022-04-01T11:47:38";s:4:"guid";a:1:{s:8:"rendered";s:31:"https://rankmath.com/?p=1037322";}s:8:"modified";s:19:"2022-04-01T11:47:40";s:12:"modified_gmt";s:19:"2022-04-01T11:47:40";s:4:"slug";s:22:"fix-invalid-json-error";s:6:"status";s:7:"publish";s:4:"type";s:4:"post";s:4:"link";s:49:"https://rankmath.com/blog/fix-invalid-json-error/";s:5:"title";a:1:{s:8:"rendered";s:47:"How to Fix the Invalid JSON Error in WordPress?";}s:7:"content";a:2:{s:8:"rendered";s:16668:"
<p>Have you ever tried to upload a file or modify a piece of content on your WordPress site and been greeted by a frightening red notification that reads, &#8220;<strong>Updating failed. The response is not a valid JSON response</strong>&#8220;.</p>



<p>This invalid JSON error usually occurs when you update or edit your posts in WordPress. While working, getting this error message can disrupt your editing and sometimes be annoying. </p>



<p>Don&#8217;t worry — while this message might seem ominous, there are some easy fixes to prevent this issue from happening in the future.</p>



<!--more-->



<div id="toc">
    <h2>How To Fix &#8216;Updating Failed. The Response is Not a Valid JSON Response&#8217; Error</h2>
    <ol>
            <ul>
                <li><a href="#url-settings">Check the URL Settings of the WordPress Site</a></li>
                <li><a href="#permalink-structure">Fix the WordPress Permalink Structure</a></li>
                <li><a href="#regenerate-htaccess-file">Regenerate WordPress .htaccess File</a></li>
                <li><a href="#check-themes-plugins">Check the Themes and Plugins</a></li>
                <li><a href="#classic-editor">Use Classic Editor</a></li>
                <li><a href="#site-health">Check the Site Health</a></li>
                <li><a href="#security-firewall">Disable the Security Firewall</a></li>
                <li><a href="#debugging">Use Debugging in WordPress</a></li>
                <li><a href="#upload-media-files">Upload Media Files Through the Media Library</a></li>
                <li><a href="#expert-help"> Look for Expert Help</a></li>
            </ul>
        
    </ol>
</div>



<p>In this article, we&#8217;ll talk about the causes of this error and also how you can fix it with ease. </p>



<h2>What Triggers &#8216;Not a Valid JSON Response&#8217; Error in WordPress?</h2>



<p>The error &#8220;Updating failed. The response is not a valid JSON response&#8221; usually occurs while you&#8217;re working on your content in the WordPress Block Editor. It may also occur when you try to add a media file to your site, particularly if you submit it directly to a block in the block editor.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/invalid-json-error-message-1.jpg" alt="Updating failed. The response is not a valid response error message" class="wp-image-1038712" width="900" /></figure>



<p>So, what causes this to happen?</p>



<p>When you edit a website page or post, it connects to the server to respond. Your website uses JavaScript to send this response in JSON format. If your JavaScript code has an error and WordPress cannot connect to the hosting server, you will receive this error message.</p>



<p>In simple words, if the editor can&#8217;t communicate with the server, it will show you the error. The error could appear due to various reasons, most likely due to incorrect URL settings or broken permalinks. </p>



<p>With that being said, let&#8217;s take a look at how to fix the invalid JSON error in WordPress.</p>



<p>Before we begin, we highly recommend you take a <strong>backup of your site</strong> so that if something goes wrong, you can undo all the changes and restore your site to the previous state.</p>



<h2>How to Fix The &#8220;Updating Failed. The Response is Not a Valid JSON Response&#8221; Error in WordPress</h2>



<p>Now that you&#8217;re aware of what an invalid JSON response error message means error let&#8217;s look at some troubleshooting methods to fix this error message.</p>



<h3 id="url-settings"><span class="number">1</span>  Check the URL Settings of the WordPress Site</h3>



<p>One of the common causes of this error is incorrect URL settings. If you accidentally put HTTP instead of HTTPS (assuming your site is using an SSL certificate), it results in a mixed content error where both HTTP and HTTPS content is transmitted at the same time to the web browser. Hence you&#8217;re bound to get this error message.</p>



<p>To fix the error, you need to ensure that your <strong>WordPress Address</strong> and <strong>Site Address</strong> settings are correct. You can check these settings by navigating to <strong>Settings &gt; General</strong> from your WordPress dashboard, as shown below.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/general-settings-1.jpg" alt="Check the URL settings to fix updating failed. the response is not a valid json response Error in WordPress." class="wp-image-1037619" width="900" /></figure>



<p>If you&#8217;ve made any changes to this page, don&#8217;t forget to save them by clicking on the <strong>Save Changes</strong> button. You can now edit a blog post and see if adding any new blocks or saving the post triggers the error. </p>



<h3 id="permalink-structure"><span class="number">2</span>  Fix the WordPress Permalink Structure</h3>



<p>WordPress <a href="https://rankmath.com/kb/wordpress-permalinks/">permalinks</a> are the unique URLs for each of your posts and pages. However, there are chances you might mess up with the permalink settings. The WordPress editor will not receive a valid JSON response and cause the error to appear in such a case.</p>



<p>To fix this, navigate to <strong>Settings &gt; Permalinks</strong> from your WordPress dashboard and ensure that the correct permalink setting is selected. If you&#8217;re not aware of using the right settings, select the default permalink settings and click on the <strong>Save</strong> <strong>Changes</strong> button.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/verify-permalink-settings-scaled.jpg" alt="Fix the permalink structure" class="wp-image-1037673" width="900" /></figure>



<p>Once you&#8217;ve fixed the permalink settings, try editing your post to see if it has fixed the error.</p>



<h3 id="regenerate-htaccess-file"><span class="number">3</span>  Regenerate WordPress .htaccess File</h3>



<p>In WordPress, the .<a href="https://mythemeshop.com/blog/edit-htaccess-file/" target="_blank" rel="noopener">htaccess file</a> is utilized as a configuration file to manage SEO-friendly URLs (permalinks). </p>



<p>WordPress can normally regenerate and update the file on its own. The update can also be triggered by clicking the <strong>Save Changes </strong>button at the bottom of the <strong>Settings &gt; Permalinks</strong> page.</p>



<p>However, it is possible that the settings will not be updated or might be inaccurate. Hence, your WordPress permalinks would be affected, and you&#8217;ll still notice the error. You can then make sure your .htaccess file is clean by deleting it and forcing WordPress to create a new one.</p>



<p>To fix this, use an <a href="https://mythemeshop.com/?post_type=post&amp;s=FTP" target="_blank" rel="noopener">FTP</a> client or the file management software in your WordPress hosting account dashboard to connect to your website. Once you&#8217;ve connected, look for the .htaccess file in the root folder. Make a backup copy of the file on your computer.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/download-htaccess-file.jpg" alt="Download .htaccess file" class="wp-image-1037878" width="900" /></figure>



<p>Delete the file from the server. Now, navigate to <strong>Settings &gt; Permalinks</strong> from your WordPress dashboard. Then, make sure the permalink option of your choice is selected, and then click on the <strong>Save Changes</strong> button. This will create a new clean .htaccess file for your website. Now check if the error &#8220;Updating failed. The response is not a valid JSON response&#8221; is resolved on your site.</p>



<h3 id="check-themes-plugins"><span class="number">4</span>  Check the Themes and Plugins</h3>



<p>If the above methods don&#8217;t work, you can determine whether a theme or plugin causes the problem. So, from your WordPress dashboard, navigate to <strong>Appearance &gt; Themes. </strong>Then activate the default WordPress theme and see if the problem has been resolved. If this isn&#8217;t the case, go back to your old theme.</p>



<p>The error can be caused by a plugin, in which case you need to disable all plugins on your site and check again to see if the error persists. To do so, navigate to <strong>Plugins &gt; Installed Plugins</strong> from your WordPress dashboard. Select all your WordPress plugins and choose the <strong>Deactivate</strong> option from the <strong>Bulk Actions </strong>drop-down menu, and click <strong>Apply</strong> button as shown below.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/deactivate-plugins.jpg" alt="Deactivate plugins to fix 'Updating failed. The Response is Not a Valid JSON Response' error" class="wp-image-1037885" width="900" /></figure>



<p>If the error does not appear, the problem is likely due to a plugin. </p>



<p>To figure out which plugin is causing the issue, perform the below steps:</p>



<ul><li>Turn on each plugin separately and see if the error occurs. </li><li>If the error persists after you enable a particular plugin, you&#8217;ll know which one is causing the error. </li><li>You can then deactivate that plugin and activate the remaining plugins. You can further reach out to the plugin author for support or look for an alternative plugin. </li></ul>



<h3 id="classic-editor"><span class="number">5</span>  Use Classic Editor </h3>



<p>WordPress upgraded its Classic Editor in December 2018 to the new Gutenberg/Block Editor. Since then, many users have encountered this problem. Hence, you can switch to the Classic Editor to solve the error. At first, you need to install and activate the <a href="https://wordpress.org/plugins/classic-editor/" target="_blank" rel="noreferrer noopener">Classic Editor</a> plugin.</p>



<p>If you use the Classic Editor, the new Block Editor of WordPress will be replaced by the old Classic Editor. This will alter how you edit your pages and posts in the future. This may also impact the formatting and layout of existing pages and posts previously changed with the Block editor.</p>



<p>As a result, you should first secure your site by changing a setting in the Classic Editor before using it. Once you&#8217;ve activated the Classic Editor, navigate to <strong>Settings &gt; Writing</strong> from your WordPress dashboard. From here, select <strong>Classic editor</strong> as the default editor for all users. </p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/writing-settings.jpg" alt=" switch to classic editor" class="wp-image-1037896" width="900" /></figure>



<p>You can also select the <strong>Yes</strong> option and allow users to switch editors. This will allow you to utilize the Gutenberg/Block editor on your current pages and posts, so you won&#8217;t have to worry about losing work if you want to change any of your existing pages or articles. Save your changes and try editing the post to see if the error is resolved.</p>



<h3 id="site-health"><span class="number">6</span>  Check the Site Health</h3>



<p>WordPress provides improvement recommendations for your website by showing the health of your site. To check the site&#8217;s health, navigate to <strong>Tools &gt; Site Health </strong>page as shown below. </p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/check-site-health.jpg" alt="Check site health" class="wp-image-1037906" width="900" /></figure>



<p>You can check if WordPress REST API on your website encountered an error. To do so, look for a heading such as &#8220;<strong>The REST API encountered an unexpected result.</strong>&#8221; If you find this issue, solving the issue might fix the JSON response error for your website.</p>



<h3 id="security-firewall"><span class="number">7</span>  Disable the Security Firewall</h3>



<p>If you use a firewall to secure your WordPress site, it may cause the editor&#8217;s connection with your server to be disrupted, resulting in the &#8220;Updating failed. The response is not a valid JSON response&#8221; error.</p>



<p>The simplest approach to sort this out is to disable your WordPress firewall plugin or service for a while. If the editor starts working, the firewall is the cause of the error.</p>



<p>If your firewall is set up at the host level, you can ask your WordPress provider to look into it and whitelist the editor to prevent it from triggering the firewall. If you are using a WordPress security or a firewall plugin, you can choose to:</p>



<ul><li> Replace your current firewall plugin with a new one that helps secure your site without causing issues.</li><li> You can contact the plugin&#8217;s developer to help you solve the error.</li></ul>



<h3 id="debugging"><span class="number">8</span>  Use Debugging in WordPress</h3>



<p>WordPress allows you to keep a log of errors, but it&#8217;s not enabled by default. To enable it, add the following code snippet in your <strong>wp-config.php</strong> file.</p>



<pre class="wp-block-code"><code>define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );</code></pre>



<p> Once you&#8217;ve added the code, WordPress will maintain a log of all the errors in a <strong>debug.log</strong> file. You can access this file inside the <strong>/wp-content/</strong> folder through the FTP client. The error log can provide you with a clue and help you solve the invalid JSON error on your site.</p>



<h3 id="upload-media-files"><span class="number">9</span>  Upload Media Files Through the Media Library</h3>



<p>If you&#8217;re still receiving the error when uploading media files through the Block Editor, one solution is to submit the images directly to your <strong>Media Library</strong> rather than through the block interface.</p>



<p>To do so, when you&#8217;re adding an image block, click on the <strong>Media Library</strong> option. </p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/select-media-library-option.jpg" alt="Select media library option" class="wp-image-1038034" width="900" /></figure>



<p>Then select the file you want to upload and click on the <strong>Select</strong> button.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/select-media-library-scaled.jpg" alt="upload files through media library" class="wp-image-1038030" width="900" /></figure>



<p>This should resolve the invalid JSON response error. This is a temporary fix, but it can come in handy if you&#8217;re in the middle of creating a post or if none of the other methods work.</p>



<p>Also, if you try to upload images containing unsupported characters in the image name, you may get the error &#8220;The response is not a valid JSON response.&#8221; <a href="https://rankmath.com/kb/how-to-name-images-for-seo/">Naming images</a> correctly is important. As a result, you can only use English letters, numbers, and other symbols like hyphens to rename your image. Once you&#8217;ve renamed your images appropriately, upload the image to see if the error has been resolved.</p>



<h3 id="expert-help"><span class="number">10</span>  Look for Expert Help</h3>



<p>If none of the above-listed methods are at your rescue, then the error could be due to a misconfiguration on your hosting server. You can contact the host team either by raising a support ticket or through a live chat, and they may be able to help you fix the issue.</p>



<h2>Conclusion </h2>



<p>The invalid JSON error can be annoying as it appears while working in your WordPress editor. </p>



<p>Fortunately, debugging this problem shouldn&#8217;t be too difficult for most sites.</p>



<p>In most cases, re-saving your WordPress permalinks should solve the issue. If that doesn&#8217;t work, you&#8217;ll need to look into other options like reviewing your site&#8217;s URLs, checking the themes and plugins, modifying your firewall, and so on. Try to implement the troubleshooting methods mentioned in this article, and your site should be up and running in no time.</p>



<p>Which method has worked for you? Let us know by <a href="https://twitter.com/rankmathseo" target="_blank" rel="noopener"><strong>Tweeting @rankmathseo.</strong></a> 💬</p>
";s:9:"protected";b:0;}s:7:"excerpt";a:2:{s:8:"rendered";s:347:"<p>Have you ever tried to upload a file or modify a piece of content on your WordPress site and been greeted by a frightening red notification that reads, &#8220;Updating failed. The response is not a valid JSON response&#8220;. This invalid JSON error usually occurs when you update or edit your posts in WordPress. While working, [&hellip;]</p>
";s:9:"protected";b:0;}s:6:"author";i:37;s:14:"featured_media";i:1042694;s:14:"comment_status";s:6:"closed";s:11:"ping_status";s:6:"closed";s:6:"sticky";b:0;s:8:"template";s:0:"";s:6:"format";s:8:"standard";s:4:"meta";a:0:{}s:10:"categories";a:1:{i:0;i:136;}s:4:"tags";a:0:{}s:6:"_links";a:11:{s:4:"self";a:1:{i:0;a:1:{s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/posts/1037322";}}s:10:"collection";a:1:{i:0;a:1:{s:4:"href";s:40:"https://rankmath.com/wp-json/wp/v2/posts";}}s:5:"about";a:1:{i:0;a:1:{s:4:"href";s:45:"https://rankmath.com/wp-json/wp/v2/types/post";}}s:6:"author";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:43:"https://rankmath.com/wp-json/wp/v2/users/37";}}s:7:"replies";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:56:"https://rankmath.com/wp-json/wp/v2/comments?post=1037322";}}s:15:"version-history";a:1:{i:0;a:2:{s:5:"count";i:2;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/posts/1037322/revisions";}}s:19:"predecessor-version";a:1:{i:0;a:2:{s:2:"id";i:1042800;s:4:"href";s:66:"https://rankmath.com/wp-json/wp/v2/posts/1037322/revisions/1042800";}}s:16:"wp:featuredmedia";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/media/1042694";}}s:13:"wp:attachment";a:1:{i:0;a:1:{s:4:"href";s:55:"https://rankmath.com/wp-json/wp/v2/media?parent=1037322";}}s:7:"wp:term";a:2:{i:0;a:3:{s:8:"taxonomy";s:8:"category";s:10:"embeddable";b:1;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/categories?post=1037322";}i:1;a:3:{s:8:"taxonomy";s:8:"post_tag";s:10:"embeddable";b:1;s:4:"href";s:52:"https://rankmath.com/wp-json/wp/v2/tags?post=1037322";}}s:6:"curies";a:1:{i:0;a:3:{s:4:"name";s:2:"wp";s:4:"href";s:23:"https://api.w.org/{rel}";s:9:"templated";b:1;}}}}i:1;a:24:{s:2:"id";i:1038212;s:4:"date";s:19:"2022-03-29T12:02:10";s:8:"date_gmt";s:19:"2022-03-29T12:02:10";s:4:"guid";a:1:{s:8:"rendered";s:31:"https://rankmath.com/?p=1038212";}s:8:"modified";s:19:"2022-03-29T12:06:45";s:12:"modified_gmt";s:19:"2022-03-29T12:06:45";s:4:"slug";s:29:"image-upload-issues-wordpress";s:6:"status";s:7:"publish";s:4:"type";s:4:"post";s:4:"link";s:56:"https://rankmath.com/blog/image-upload-issues-wordpress/";s:5:"title";a:1:{s:8:"rendered";s:51:"How to Quickly Fix Image Upload Issues in WordPress";}s:7:"content";a:2:{s:8:"rendered";s:14042:"
<p>Images are an essential component of any website as they further help enhance your site. Nowadays, most of us can&#8217;t imagine writing a blog article without using images. </p>



<p>Certainly, the text on your blog will always play a significant role in <a href="https://mythemeshop.com/blog/blogging-seo/" target="_blank" rel="noopener">SEO</a>. However, using images in your post will help it stand out and drive more visitors to your site.</p>



<p>When you&#8217;re regularly uploading images to your WordPress website, it&#8217;s natural to encounter an error message now and then.  But you need not worry. Fortunately, even the most obscure image upload issues in WordPress can be easily diagnosed.</p>



<p>In this article, we&#8217;ll figure out the image-related issues and look at some easy hacks to avoid them in the future. Then, the next time, when the WordPress Media Library refuses to cooperate with your creative vision, you should have no trouble adding gorgeous, eye-catching visuals to your website. </p>



<!--more-->



<p>So, without further ado, let&#8217;s get started!</p>



<div id="toc">
    <h2>Table Of Contents</h2>
    <ol>
        <li><a href="#error">Common WordPress Image Upload Errors and Solutions to Fix Them</a></li>
            <ul>
                <li><a href="#file-permissions">Change File Permissions</a></li>
                <li><a href="#rename">Rename the Image</a></li>
                <li><a href="#resize">Resize the  Image</a></li>
                <li><a href="#clear">Clear the Cache</a></li>
                <li><a href="#deactivate-plugins">Deactivate the Plugins</a></li>
                <li><a href="#check-theme">Check the Theme</a></li>
                <li><a href="#memory-limit">Increase the PHP Memory Limit</a></li>
                <li><a href="#browser-uploader">Try the Browser Uploader</a></li>
                <li><a href="#switch-browsers">Switch the Browsers</a></li>
                <li><a href="#check-php-version">Check the PHP Version</a></li>
            </ul>
        
        <li><a href="#conclusion">Conclusion</a></li>
    </ol>
</div>



<h2 id="error"><span class="number">1</span>  <strong>Common WordPress Image Upload Errors and Solutions to Fix Them</strong></h2>



<p>Beautiful, attention-seeking images are an integral part of almost any website. Product images are especially significant for generating sales in an <a href="https://rankmath.com/blog/woocommerce-seo/">e-commerce site</a> since they allow customers to see what they&#8217;re buying.  </p>



<p>Nothing is worse than spending 10 minutes trying to find that perfect image for your blog post or your e-commerce site, you go to upload it, and bam, you suddenly&nbsp;greet a very vague error such as <strong>An error occurred in the upload. Please try again later</strong>. </p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/image-upload-error.jpg" alt="Image upload error in WordPress" class="wp-image-1042042" width="900" /></figure>



<p>Failure to upload images is one of the most&nbsp;common image issues in WordPress. These image upload issues can be triggered due to a wide range of factors. </p>



<p>Let us now look at the common image upload issues and how you can quickly resolve them and get back to uploading the media on your site.</p>



<h3 id="file-permissions"><span class="number">1.1</span>  Change File Permissions </h3>



<p>One of the most common problem is incorrect file permissions.</p>



<p>WordPress cannot read or upload files on the hosting server due to incorrect file permissions. When uploading an image file, you may receive the following error: <strong>Unable to create directory wp-content/uploads/2022/14. Is its parent directory writable by the server?</strong></p>



<p>Another sign of this issue is that your images may not appear in the media library. You can then change the file permissions and solve the image upload issue.</p>



<p>To change the file permissions, connect your website through <a href="https://mythemeshop.com/blog/upload-files-on-wordpress-using-ftp/" target="_blank" rel="noopener">FTP</a>. Navigate to the <strong>/wp-content/&nbsp;</strong>folder. Inside, you’ll find the&nbsp;<strong>uploads</strong>&nbsp;folder, where all your media uploads are stored, including images. Right-click on the <strong>uploads</strong> folder and select <strong>File permissions</strong>, as shown below.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/change-file-permissions.jpg" alt="Change file permissions to fix the image upload issue" class="wp-image-1038951" width="900" /></figure>



<p>Type <strong>744</strong> into the number value box and check the box next to the option <strong>Recurse into subdirectories</strong>. Now select the radio option that says &#8216;<strong>Apply to directories only.&#8217;</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" width="616" height="936" src="https://rankmath.com/wp-content/uploads/2022/03/change-file-attributes-1.jpg" alt="Change file attributes" class="wp-image-1038960" /></figure>



<p>To save your changes, click the <strong>OK </strong>button<strong>. </strong>Your FTP client will now apply the file permissions for the directories. If this doesn&#8217;t work, set the value to <strong>755</strong> and try again.</p>



<p>Next, you&#8217;ll need to <strong>set file permissions for all the files</strong> in the uploads directory. </p>



<p>To do so, right-click the <strong>uploads</strong> directory and select the <strong>File permissions</strong> option from the menu. Change the numeric value to <strong>644</strong> in the file permissions dialogue box. </p>



<p>Check the box next to&nbsp;<strong>Recurse into subdirectories</strong>. Lastly, you need to select the radio option that says <strong>Apply to files only.</strong> To save your changes, click the <strong>OK </strong>button.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="610" height="940" src="https://rankmath.com/wp-content/uploads/2022/03/change-file-permissions-1.jpg" alt="Change file permissions for all the files" class="wp-image-1038963" /></figure>



<p>All files in the uploads folder will now have their permissions changed by the FTP client. You can now return to your WordPress admin area and attempt uploading the images once more. This should solve the image upload issue on your site.</p>



<h3 id="rename"><span class="number">1.2</span>  <strong>&nbsp;Rename the Image</strong></h3>



<p>If you&#8217;re only experiencing trouble with a single image, start by looking at the file&#8217;s name. The WordPress uploader may have problems uploading your image if you use special characters ($, *, &amp;, #) or accent letters (ñ, á, é). Rename the image with the <a href="https://rankmath.com/kb/how-to-name-images-for-seo/">correct file name</a> and upload it again.</p>



<h3 id="resize"><span class="number">1.3</span>  Resize the  Image</h3>



<p>It&#8217;s also possible that the image is too big, both in terms of dimensions and file size. You can try reducing the size by using image compression tools. But if you regularly encounter this problem, you can raise the limit by adding code to the site&#8217;s <strong>php.ini</strong> file.</p>



<pre class="wp-block-code"><code>upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300</code></pre>



<h3 id="clear"><span class="number">1.4</span>  <strong>Clear the Cache</strong></h3>



<p>If you&#8217;re using a caching plugin, clearing the cache might be all you need to fix your image upload issues. If you think that caching could cause the error, your steps will depend on your chosen caching plugin. </p>



<p>For example, if you’re using the&nbsp;<a href="https://wordpress.org/plugins/w3-total-cache/" target="_blank" rel="noopener">W3 Total Cache plugin</a>, you can clear the cache by selecting&nbsp;<strong>Performance &gt; Purge All Caches&nbsp;</strong>from your WordPress toolbar.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/purge-all-caches.jpg" alt="Clear the browser cache" class="wp-image-1038994" width="900" /></figure>



<p>If you&#8217;re not sure how to clear the cache in your specific plugin, the <span style="font-weight: 600">plugin&#8217;s Settings menu</span> is usually a good place to start. For further information, you can visit the developer&#8217;s official documentation.</p>



<h3 id="deactivate-plugins"><span class="number">1.5</span>  Deactivate the Plugins</h3>



<p>Plugins are the bread and butter of the WordPress system. If you&#8217;re using any plugins, it&#8217;s always worth trying disabling them one at a time to see if it fixes your image upload issue. </p>



<p>To deactivate the plugins, navigate to <strong>Plugins &gt; Installed Plugins</strong> from your WordPress dashboard to deactivate the plugins. Select the plugins from the list and choose the <strong>Deactivate</strong> option from the drop-down menu. Then click on the <strong>Apply</strong> button as shown below.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/deactivate-plugins-1.jpg" alt="Deactivate the plugins" class="wp-image-1039012" width="900" /></figure>



<p>If this does not solve the problem, get in touch with the plugin developer to see if they can help you fix the image upload issue on your site.</p>



<h3 id="check-theme"><span class="number">1.6</span>  Check the Theme</h3>



<p>Another option is to back up your website and switch to a default theme for a short period of time. If your image uploads properly, the issue is most likely with your current theme.</p>



<p>To further troubleshoot the image upload issue on your site, contact the theme developer.</p>



<h3 id="memory-limit"><span class="number">1.7</span>  Increase the PHP Memory Limit</h3>



<p>When you try to upload an image, you can get an HTTP error from WordPress. Low server resources or unusual traffic might also cause this error. As a result, waiting a few minutes before attempting to re-upload the image is always a good idea.</p>



<p>If the problem persists, you may have reached the WordPress memory limit. You can increase the amount of memory by connecting your site using FTP. To fix this, increase the limit to <strong>256MB</strong> by adding the following code snippet to your <strong>wp-config.php</strong> file.</p>



<pre class="wp-block-code"><code>define('WP_MEMORY_LIMIT', '256M');</code></pre>



<p>Try uploading the file again and your image upload issue should be resolved.</p>



<h3 id="browser-uploader"><span class="number">1.8</span>  Try the Browser Uploader</h3>



<p>If you&#8217;ve tried all of the above ways and still experiencing problems, you can use the built-in file uploader in your browser. Unlike the WordPress image uploader, the browser uploader does not support multiple file selection or drag and drop. However, it can be a beneficial workaround when you need to upload an image quickly.</p>



<p>Navigate to <strong>Media &gt; Add New</strong> from your WordPress dashboard to use the image uploader. Select the <strong>browser uploader </strong>link and click on <strong>Choose File</strong>. </p>



<p>This brings up the file selection dialogue, where you can upload the image as usual. If this fix is successful, you should try uploading an image using WordPress standard image uploader to determine if your image upload issue has been solved.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/browser-uploader.jpg" alt="Try the browser uploader" class="wp-image-1039261" width="900" /></figure>



<h3 id="switch-browsers"><span class="number">1.9</span>  Switch the Browsers</h3>



<p>When using Google Chrome, users occasionally report HTTP problems. Changing browsers may assist you in determining whether or not the problem is due to your website.</p>



<p>If you can upload the file in another browser, you should contact your chosen platform&#8217;s support to figure out what&#8217;s causing the problem.</p>



<h3 id="check-php-version"><span class="number">1.10</span>  Check the PHP Version</h3>



<p>Check the PHP version of your site. Anything lower than version 7 will cause problems, especially if you&#8217;re using the most recent WordPress version. WordPress officially recommends PHP 7.4 or higher, while it will also function with previous versions. </p>



<p>You can check the version by navigating to <strong>Tools &gt; Site Health</strong> from your WordPress dashboard. Click on the <strong>Info</strong> tab and select the <strong>Server</strong> section, and you&#8217;ll be able to find your server details.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/check-php-version.jpg" alt="Check the PHP version" class="wp-image-1039270" width="900" /></figure>



<p>You can update the PHP version from your hosting dashboard and then try uploading the image. Your image upload issue should disappear once you&#8217;ve updated the PHP version.</p>



<h2 id="conclusion"><span class="number">2</span> Conclusion</h2>



<p>If you create content frequently, you’ll most certainly encounter the image upload error eventually (or other&nbsp;<a href="https://rankmath.com/kb/api-http-400-error/">HTTP error codes and status codes</a>).&nbsp;Hopefully, one of the methods listed above should work for you, and you should be back on track with your media uploads.</p>



<p>Have any additional questions about the image upload issues you’d like us to cover in this post? Let us know by <a href="https://twitter.com/rankmathseo" target="_blank" rel="noopener"><strong>Tweeting @rankmathseo.</strong></a> 💬</p>
";s:9:"protected";b:0;}s:7:"excerpt";a:2:{s:8:"rendered";s:338:"<p>Images are an essential component of any website as they further help enhance your site. Nowadays, most of us can&#8217;t imagine writing a blog article without using images. Certainly, the text on your blog will always play a significant role in SEO. However, using images in your post will help it stand out and drive [&hellip;]</p>
";s:9:"protected";b:0;}s:6:"author";i:37;s:14:"featured_media";i:1042057;s:14:"comment_status";s:6:"closed";s:11:"ping_status";s:6:"closed";s:6:"sticky";b:0;s:8:"template";s:0:"";s:6:"format";s:8:"standard";s:4:"meta";a:0:{}s:10:"categories";a:1:{i:0;i:136;}s:4:"tags";a:0:{}s:6:"_links";a:11:{s:4:"self";a:1:{i:0;a:1:{s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/posts/1038212";}}s:10:"collection";a:1:{i:0;a:1:{s:4:"href";s:40:"https://rankmath.com/wp-json/wp/v2/posts";}}s:5:"about";a:1:{i:0;a:1:{s:4:"href";s:45:"https://rankmath.com/wp-json/wp/v2/types/post";}}s:6:"author";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:43:"https://rankmath.com/wp-json/wp/v2/users/37";}}s:7:"replies";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:56:"https://rankmath.com/wp-json/wp/v2/comments?post=1038212";}}s:15:"version-history";a:1:{i:0;a:2:{s:5:"count";i:4;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/posts/1038212/revisions";}}s:19:"predecessor-version";a:1:{i:0;a:2:{s:2:"id";i:1042938;s:4:"href";s:66:"https://rankmath.com/wp-json/wp/v2/posts/1038212/revisions/1042938";}}s:16:"wp:featuredmedia";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/media/1042057";}}s:13:"wp:attachment";a:1:{i:0;a:1:{s:4:"href";s:55:"https://rankmath.com/wp-json/wp/v2/media?parent=1038212";}}s:7:"wp:term";a:2:{i:0;a:3:{s:8:"taxonomy";s:8:"category";s:10:"embeddable";b:1;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/categories?post=1038212";}i:1;a:3:{s:8:"taxonomy";s:8:"post_tag";s:10:"embeddable";b:1;s:4:"href";s:52:"https://rankmath.com/wp-json/wp/v2/tags?post=1038212";}}s:6:"curies";a:1:{i:0;a:3:{s:4:"name";s:2:"wp";s:4:"href";s:23:"https://api.w.org/{rel}";s:9:"templated";b:1;}}}}i:2;a:24:{s:2:"id";i:1033305;s:4:"date";s:19:"2022-03-18T09:47:03";s:8:"date_gmt";s:19:"2022-03-18T09:47:03";s:4:"guid";a:1:{s:8:"rendered";s:31:"https://rankmath.com/?p=1033305";}s:8:"modified";s:19:"2022-03-18T09:47:05";s:12:"modified_gmt";s:19:"2022-03-18T09:47:05";s:4:"slug";s:33:"the-link-you-followed-has-expired";s:6:"status";s:7:"publish";s:4:"type";s:4:"post";s:4:"link";s:60:"https://rankmath.com/blog/the-link-you-followed-has-expired/";s:5:"title";a:1:{s:8:"rendered";s:56:"How to Fix “The Link You Followed Has Expired” Error";}s:7:"content";a:2:{s:8:"rendered";s:10515:"
<p>Do you see an error message in WordPress that says &#8220;The Link You Followed Has Expired&#8221;? This is one of the most typical WordPress issues you could encounter when using the platform. </p>



<p>The issue commonly occurs when the file you&#8217;re trying to upload exceeds WordPress&#8217;s default upload and execution limits. Increasing the default upload limits is the best method to fix the problem by using one of the below ways.</p>



<ul><li>Increase the limits in the functions.php file</li><li>Increase the limits in the .htaccess file</li><li>Increase the limits in the php.ini file</li><li>Update the PHP version</li><li>Contact hosting provider</li></ul>



<p>In this article, we&#8217;ll show you how to fix &#8220;The link you followed has expired&#8221; with the above-mentioned ways. So without further ado, let&#8217;s get started.</p>



<!--more-->



<div id="toc">
    <h2>Table Of Contents</h2>
    <ol>
        <li><a href="#error">What Causes &#8220;The Link You Followed Has Expired&#8221; Error</a></li>
        <li><a href="#fix-error">How To Fix “The Link You Followed Has Expired” Error</a>
            <ul>
                <li><a href="#increase-limits-functions.php">Increase the Limits in the functions.php File</a></li>
                <li><a href="#increase-limits-htaccess">Increase the Limits in the .htaccess File</a></li>
                <li><a href="#increase-limits-php.ini">Increase the Limits in the php.ini File</a></li>
                <li><a href="#update-php-version">Update the PHP Version</a></li>
                <li><a href="#contact-hosting-provider">Contact Hosting Provider</a></li>
            </ul>
        </li>
        <li><a href="#conclusion">Conclusion</a></li>
    </ol>
</div>



<h2 id="error"><span class="number">1</span>  What Causes &#8220;The Link You Followed Has Expired&#8221; Error</h2>



<p>&#8220;The link you followed has expired&#8221; error is common when uploading a WordPress theme or plugin from the WordPress admin area to your website. The default settings for WordPress hosting companies limit the size of a file you can upload via the WordPress admin panel. If you try to upload a theme file that is larger than the normal limit, you will receive this error message. </p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/link-you-followed-expired.jpg" alt="The link you followed has expired error" class="wp-image-1039101" width="900" /></figure>



<p>Moreover, the fundamental issue is the lack of a description of this error. The error notice provides little information about what is wrong, and hence beginners usually find it difficult to solve this error. You can always check the configuration values from <strong>WordPress Dashboard &gt; Tools &gt; Site Health &gt; Info &gt; Server</strong>, as shown below.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/03/site-health-1-scaled.jpg" alt="check the site health" class="wp-image-1035440" width="900" /></figure>



<p>You can also quickly determine the maximum file size that can be uploaded. To do so, navigate to <strong>Media &gt; Add New</strong> in the WordPress dashboard; you&#8217;ll see a remark under the &#8216;Drop files to upload&#8217; area that displays the default WordPress file size limit for uploading.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/02/max-upload-file-size-scaled.jpg" alt="Maximum upload file size in WordPress" class="wp-image-1033946" width="900" /></figure>



<p>Even if your installation and hosting have enough upload limits, WordPress will be unable to upload larger files if the maximum execution time is limited and its value is minimal. You will receive an error message stating that the link you followed has expired in these circumstances. Now let&#8217;s look at how to fix this error with ease.</p>



<h2 id="fix-error"><span class="number">2</span>  How To Fix “The Link You Followed Has Expired” Error</h2>



<p>Increasing your website&#8217;s file upload size, PHP memory, and execution time limitations is the easiest approach to fix this error. We&#8217;ll show you different ways to solve this error, and you can choose the best for your hosting environment.</p>



<p>We strongly recommend you <strong>back up your website </strong>before changing the core WordPress files.</p>



<h3 id="increase-limits-functions.php"><span class="number">2.1</span>  Increase the Limits in the functions.php File</h3>



<p>To increase the limits add the following code in your <strong>functions.php</strong> file and update the file.</p>



<pre class="wp-block-code"><code>@ini_set( 'upload_max_size' , '130M' );
@ini_set( 'post_max_size', '130M');
@ini_set( 'max_execution_time', '300' );</code></pre>



<p>Here is the interpretation of the values:</p>



<ul><li><strong>upload_max_size</strong>: The maximum file size you’re allowed to upload.</li><li><strong>post_max_size</strong>: The maximum size for all data in a post, including text, images, and other media.</li><li><strong>max_execution_time:</strong> The maximum amount of time a script can run before being aborted, even if it isn&#8217;t finished.</li></ul>



<p>You can set the values for the upload_max_size and post_max_size variables as per your requirement. You can also ensure that the max_execution_time is long enough to upload the file.</p>



<h3 id="increase-limits-htaccess"><span class="number">2.2</span>  Increase the Limits in the .htaccess File</h3>



<p>If you&#8217;re not sure about adding code in your functions.php file, you can choose this method. WordPress uses the <a href="https://rankmath.com/kb/edit-htaccess/">.htaccess file</a> as a fundamental file. We can adjust the default upload limitations established by WordPress by editing this file and copying a code into the file.</p>



<p>To do so, connect to your website using <a href="https://mythemeshop.com/blog/upload-files-on-wordpress-using-ftp/" target="_blank" rel="noopener">FTP</a> and edit the .htaccess file.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/02/edit-.htaccess-ftp.jpg" alt="Edit .htaccess file to solve the link you followed has expired error" class="wp-image-1034128" width="900" /></figure>



<p>Now add the following code snippet at the bottom of your .htaccess file. </p>



<pre class="wp-block-code"><code>php_value upload_max_filesize 138M
php_value post_max_size 138M
php_value max_execution_time 300
php_value max_input_time 300</code></pre>



<p>Once done, save changes and upload the file to your website.</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="1382" height="826" src="https://rankmath.com/wp-content/uploads/2022/02/add-code-.htaccess-file.jpg" alt="Add code to .htaccess file" class="wp-image-1034296" /></figure>



<h3 id="increase-limits-php.ini"><span class="number">2.3</span>  Increase the Limits in the php.ini File</h3>



<p>If you do not wish to edit your functions.php or .htaccess file, you can increase the limits in the php.ini file. This is accomplished by modifying or creating a php.ini file.</p>



<p>First, check if your site&#8217;s <strong>public_html</strong> folder on the server already contains a php.ini file. You can check this by logging into your hosting account and using cPanel&#8217;s File Manager or FTP to access your files. </p>



<p>If the file does not exist, you can create a blank php.ini file using a plain text editor like notepad, add the below code snippet and upload it to your website.</p>



<pre class="wp-block-code"><code>upload_max_filesize = 138M
post_max_size = 138M
max_execution_time = 300</code></pre>



<h3 id="update-php-version"><span class="number">2.4</span>  Update the PHP Version</h3>



<p>You can expect the &#8220;Link you followed expired&#8221; issue on your site if you use an outdated PHP version. You&#8217;ll have a hard time keeping your website functioning properly if WordPress isn&#8217;t compatible with your PHP version. </p>



<p>You can update the PHP version from the cPanel hosting providers. To do so, login to your control panel click&nbsp;<strong>PHP Configuration</strong>&nbsp;under&nbsp;the <strong>Advanced</strong> settings.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/02/php-configuration.jpg" alt="PHP Configuration in cPanel" class="wp-image-1034281" width="900" /></figure>



<p>Here you can select the PHP version you want from the list. Then, click&nbsp;<strong>Update</strong>&nbsp;to apply it&nbsp;server-wide.</p>



<figure class="wp-block-image size-full is-resized"><img src="https://rankmath.com/wp-content/uploads/2022/02/change-php-version-1-scaled.jpg" alt="Select PHP version" class="wp-image-1034287" width="900" /></figure>



<h3 id="contact-hosting-provider"><span class="number">2.5</span>  Contact Hosting Provider</h3>



<p>If none of the above-listed methods works for you, consider contacting your host provider. Their support team will help you resolve the error.</p>



<h2 id="conclusion"><span class="number">3</span>  Conclusion</h2>



<p>If you have a WordPress site, it&#8217;s pretty normal to run into errors at some point in time. But it&#8217;s easy to <a href="https://mythemeshop.com/wordpress-errors-fixes/" target="_blank" rel="noopener">resolve the common errors</a> and fix them. To solve the &#8220;The Link You Followed Has Expired&#8221; error, you can choose to edit the functions.php file and increase the PHP resources. If you don&#8217;t wish to add any extra code to your site, you can use the .htaccess method instead.</p>



<p>Alternatively, the php.ini technique is likewise simple and quick; however, you should update to the most recent PHP version for the best results if you&#8217;re having PHP compatibility issues. Finally, if none of those ways makes you feel comfortable, contact your hosting company and ask them to fix it for you.</p>



<p>The problem of uploading huge files via the WordPress admin panel should be solved by increasing PHP resources by using the methods mentioned in this article. If you&#8217;ve liked this article, let us know by <a href="https://twitter.com/rankmathseo" target="_blank" rel="noopener"><strong>Tweeting @rankmathseo.</strong></a> 💬</p>
";s:9:"protected";b:0;}s:7:"excerpt";a:2:{s:8:"rendered";s:382:"<p>Do you see an error message in WordPress that says &#8220;The Link You Followed Has Expired&#8221;? This is one of the most typical WordPress issues you could encounter when using the platform. The issue commonly occurs when the file you&#8217;re trying to upload exceeds WordPress&#8217;s default upload and execution limits. Increasing the default upload limits [&hellip;]</p>
";s:9:"protected";b:0;}s:6:"author";i:37;s:14:"featured_media";i:1039592;s:14:"comment_status";s:6:"closed";s:11:"ping_status";s:6:"closed";s:6:"sticky";b:0;s:8:"template";s:0:"";s:6:"format";s:8:"standard";s:4:"meta";a:0:{}s:10:"categories";a:1:{i:0;i:136;}s:4:"tags";a:0:{}s:6:"_links";a:11:{s:4:"self";a:1:{i:0;a:1:{s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/posts/1033305";}}s:10:"collection";a:1:{i:0;a:1:{s:4:"href";s:40:"https://rankmath.com/wp-json/wp/v2/posts";}}s:5:"about";a:1:{i:0;a:1:{s:4:"href";s:45:"https://rankmath.com/wp-json/wp/v2/types/post";}}s:6:"author";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:43:"https://rankmath.com/wp-json/wp/v2/users/37";}}s:7:"replies";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:56:"https://rankmath.com/wp-json/wp/v2/comments?post=1033305";}}s:15:"version-history";a:1:{i:0;a:2:{s:5:"count";i:3;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/posts/1033305/revisions";}}s:19:"predecessor-version";a:1:{i:0;a:2:{s:2:"id";i:1041078;s:4:"href";s:66:"https://rankmath.com/wp-json/wp/v2/posts/1033305/revisions/1041078";}}s:16:"wp:featuredmedia";a:1:{i:0;a:2:{s:10:"embeddable";b:1;s:4:"href";s:48:"https://rankmath.com/wp-json/wp/v2/media/1039592";}}s:13:"wp:attachment";a:1:{i:0;a:1:{s:4:"href";s:55:"https://rankmath.com/wp-json/wp/v2/media?parent=1033305";}}s:7:"wp:term";a:2:{i:0;a:3:{s:8:"taxonomy";s:8:"category";s:10:"embeddable";b:1;s:4:"href";s:58:"https://rankmath.com/wp-json/wp/v2/categories?post=1033305";}i:1;a:3:{s:8:"taxonomy";s:8:"post_tag";s:10:"embeddable";b:1;s:4:"href";s:52:"https://rankmath.com/wp-json/wp/v2/tags?post=1033305";}}s:6:"curies";a:1:{i:0;a:3:{s:4:"name";s:2:"wp";s:4:"href";s:23:"https://api.w.org/{rel}";s:9:"templated";b:1;}}}}}