How to fix the invalid JSON error in WordPress

How to fix the invalid JSON error in WordPress

Looking for a way to fix the invalid JSON error in WordPress?

When you are editing your post or pages, sometimes you can see the error message saying that ‘The response is not a valid JSON response’. When this error occurs you will not be able to update the page or post. Updating a page or post would fail.

Here in this article, we will show you the way to fix the invalid JSON error in the WordPress website.

Why does the error happen

When you are editing your website page or post, it needs to connect with the server to respond. Your website sends this response in JSON format using JavaScript. So if you have any error in your JavaScript code and WordPress fails to connect with the hosting server, then you can see the ‘The response is not a valid JSON response’ error message.

There are a few reasons for their problem. Here we will discuss how you can fix the error. Before making any changes to your website, we suggest you backup your website properly. If you haven’t created a backup for your website, you can use any of the backup plugins to backup your website data.

Fix The Invalid JSON Error in WordPress

WordPress URL Setting

The main reason for the invalid JSON error is the Wrong WordPress URL setting. If your site address is incorrect, we will see this error message.  When you face this problem, you need to check your WordPress URL settings first. For this go to Settings> General from your WordPress dashboard.

Now check your Address and site URL fields. By default, it has the same URL in both fields.

Fix The Invalid JSON Error in WordPress

If the URLs are incorrect, it will show you the invalid JSON error. Fix your URL and again try to edit your page, it will solve the error. If the problem still exists, then you need to follow the next step.

Check WordPress permalink

With permalinks, WordPress allows you to add a human-readable link to your website posts and pages. But sometimes the owner of the website can create the wrong permalink or mess up the permalink setup. If your hosting server did not find the right permalink then it will show the JSON error message.

To check and fix your permalink settings, go to Settings > Permalink, and then you can see all of your permalinks. Check your permalinks carefully and if you find anything wrong then you can fix the link. If you are confused with any permalink then you can easily set it as default.

Fix The Invalid JSON Error in WordPress

Deactivate all WordPress plugin

Sometimes your active WordPress plugin may conflict with the WordPress core. For this conflict, the website can not connect with the server properly and shows the JSON error. You can deactivate all the plugins and activate them one by one to check which plugins conflicts with WordPress.

To deactivate all plugins, go to Plugins-> Install plugins and then check all the plugins. From the bulk option, select deactivate and then click on the Apply button.

Now Check the error, if the error is removed then you can activate the plugin one by one to check which plugin is responsible for the invalid JSON error.

Activate the classic editor

If all the methods fail to solve the problem, then you can try to install and activate the classic editor plugin for WordPress. Install and activate the plugin and it will automatically remove the Gutenberg editor from your website. Now you can edit your post or page to avoid invalid JSON error problems.

Wrapping up

Following the process, you can easily fix the invalid JSON error problems in the WordPress website. We hope this article will help you. You can also see our other articles to learn How to add category-specific search in WordPress.

How to Put Images Side by Side in WordPress.

If you liked this article, please like our Facebook page to stay connected.

5 Comments

  • How to add sample data in WooCommerce – Free Website Monitoring Service || UptimeMonster
    12:09 pm

    […] We hope this article will help you. You can also see our other article to learn How to fix the invalid JSON error in WordPress […]

  • How to move a site from WordPress multisite to single install – Free Website Monitoring Service || UptimeMonster
    6:43 am

    […] Following the process, you will be able to move a site from your multisite to a single WordPress install. You can also see our other tutorials to learn How to fix the invalid JSON error in WordPress. […]

  • How to force change passwords in WordPress – Free Website Monitoring Service || UptimeMonster
    11:14 am

    […] How to fix the invalid JSON error in WordPress […]

  • Website maintenance tasks for fast performance – Free Website Monitoring Service || UptimeMonster
    3:26 pm

    […] We hope this article will help you to maintain your WordPress website. You can also see our other articles to learn How to fix the invalid JSON error in WordPress […]

  • How to add a WooCommerce store to Facebook – Free Website Monitoring Service || UptimeMonster
    2:15 pm

    […] How to fix the invalid JSON error in WordPress […]