In a WordPress support thread titled ‘Category request errors,’ cogdog reports that their WP Discourse plugin fails to fetch categories from Discourse, logging repeated errors: ‘The categories key was not found in the response from Discourse.’ Despite trying new API keys, checking settings, and upgrading PHP from 7.4 to 8.3, the issue persisted. Lilly suggested reviewing a related Meta Discourse topic, while angus prompted investigation into recent changes to WordPress or Discourse. cogdog confirmed no hosting or Discourse changes, but noted new plugins and activated logging. angus advised checking the /site.json endpoint — which cogdog confirmed returned categories successfully — and suggested reviewing connection setup steps. Ultimately, cogdog identified the root cause: the Discourse URL in plugin settings was incorrectly set to http:// instead of https://. Switching to https://connect.oeglobal.org resolved the issue — a classic PEBKAC error. The case was closed with gratitude and self-deprecating humor.
My WordPress site with latest version of WP Discourse is returning on every post under the discourse tab:
There was an error returning the category list from Discourse.
The logs are full of errors
[2025-09-22 00:10:14] comment.ERROR: sync_comments.get_discourse_category {"message":"The categories key was not found in the response from Discourse."}
[2025-09-30 00:15:49] comment.ERROR: sync_comments.get_discourse_category {"message":"The categories key was not found in the response from Discourse."}
I have remade the API key several times, its granted to an admin user account. The instructions under API key do not match my discourse API options. If I set the option to “All Users” there is no option to set the User, I only see that if I use the option for “Single User”
I got busy and forgot to reply. I cannot be sure since this is a WordPress site for the organization I work for. My colleagues who post there have not made much use of it, so I cannot be sure how long ago when I remember it worked correctly- maybe months.
No hosting change or cloudflare use. There has likely been new plugins. No change was made to discourse settings . I activated more logging when I noticed the problem.
Is there any other way to test what the discourse response is- as all the logs indicate is”
[2025-10-14 00:13:18] comment.ERROR: sync_comments.get_discourse_category {"message":"The categories key was not found in the response from Discourse."}
Sorry I cannot be specific, my focus is not on the tech stack, and my server admin is pretty weak on WordPress.
If possible, could you share a link to your wordpress and discourse instances? If that’s not possible, please have a look at the /site.json endpoint of your discourse. For example if you go to meta.discourse.org/site.json you’ll see some JSON that includes a categories list. Essentially that error appears if:
Your Discourse instance returns a non-error response; but
There’s no categories in your site.json for some reason.
The most likely cause of this is still that described in the topic @Lilly linked. If you could try walking through the steps in this topic and check whether you still have a valid connection to your Discourse: