No, I don’t know how to enable the WP REST API.
The WP REST API is enabled by default, but often security plugins disable it, especially listing site users. So you don’t need to find a *new* plugin to enable it, you need to find out which *existing* plugin, that’s already activated on your site, has disabled it.
But I downloaded and enabled a plugin — WP REST API Controller — and enabled user_request (“Expose the User Request post type to the REST API.”) for both sites. Would that do the trick?
That *sounds* good, but I think there was already a plugin that had deactivated listing users over the REST API. So I don’t think adding another plugin on top of it would fix it. You need to find which existing plugin had disabled it, and turn it off (or find the setting that disables is.) I’m pretty certain it would be a security plugin (eg [there’s a related FAQ](https://www.ads-software.com/plugins/print-my-blog/#the%20print%20page%20says%20%E2%80%9Cthere%20seems%20to%20be%20an%20error%20initializing%E2%80%A6%E2%80%9D%2C%20or%20is%20stuck%20on%20%E2%80%9Cloading%20content%E2%80%9D%2C%20or%20i%20can%E2%80%99t%20filter%20by%20categories%20or%20terms%20from%20the%20print%20setup%20page).)
You’ll be able to see when it’s fixed by visiting [this WP REST API page that lists users](https://test-of-pursuitofhappiness.academic.wlu.edu/wp-json/wp/v2/users) (which returns a bunch of machine-readable text called “JSON”, although it’s kinda readable by us human as well) and instead of seeing the phrase “Sorry, you are not allowed to list users” in that mess of text, you’ll see a mess of usernames and stuff.
If you don’t have any security plugins active on the site that’s doing that, it’s possible your network has a security “Must-use plugin” installed (which you can’t deactivate, and is basically hidden).
And regarding the URL that just hangs on “Loading Content”: it seems to again be a security plugin that’s doing that. Normally, Print My Blog loads posts in the background using the WP REST API, but on your site(s), when it requests posts by a specific user, it gets back an error page (HTTP 404) instead of a valid JSON response.
So, for both issues: there’s either a security plugin or some network-wide security setting that’s disabled parts of the WP REST API that deal with users, which Print My Blog needs to work.
If you have a sys admin you can talk to, I’d suggest asking them what security plugins, must-use plugins, or even webserver security settings are active. If you’re the sys admin, you could tell me what security plugin(s) you have on your site, and I can try to figure out which one is causing issues.
-
This reply was modified 4 years, 10 months ago by
Michael Nelson. Reason: formatting