How to Fix the Invalid JSON Response Error in WordPress

Per hubspot:

  • Go to Settings → Permalinks in your WordPress dashboard.
  • Click the Save Changes button. Even if you didn’t change anything, you should still click the save changes button because it will force WordPress to regenerate its rewrite rules.
  • Verify that the correct permalink structure is selected — If the correct structure is already selected, you don’t need to change anything.