Fix the ‘Publishing failed. The response is not a valid JSON response.’ error

Definitions

The ‘Publishing failed. The response is not a valid JSON response.’ is an error triggered by WordPress. It often means there’s an issue with your permalink settings or WordPress installation configuration.

Here is a visual example of the error:

Before you start

✅ In nearly 99% of cases, the ‘Publishing failed. The response is not a valid JSON response.’ is a WordPress permalink setting problem, that can easily be solved.

ℹ️ Follow the step by step fixes below in order, moving to the next if the previous one does not work.

Step by step

Reset your website permalinks

Resetting permalinks often solves the ‘Publishing failed. The response is not a valid JSON response.’ error.

1. Log in to your WordPress dashboard

2. Hover over Settings from the menu

3. Click on Permalinks from the dropdown

4. Take note of your current permalink structure. For example, our website uses the ‘Day and name’ permalink structure. Take note of your existing structure before moving to the next step.

5. Now, select a different permalink structure. It can be any other structure, besides your current one. For example, we will choose the ‘Post name’ structure.

6. Click the Save Changes button

7. Now, re-select your original permalink structure. In our example, we’ll go back to our original ‘Day and name’ permalink structure.

8. Click the Save Changes button

9. Wait a few moments and then re-attempt to publish

Use a different web browser

Try using a different browser to determine if the error is browser-specific. For example, if you normally use Google Chrome, use Safari instead.

If your website loads successfully on a different browser, you may need to update or reinstall your original web browser software, or check for and run updates.

Restore your website from backups

Restoring from backups is the quickest way to get your website operational again.

Always start by restoring your website files, and if the issue persists, proceed to restore your database.