Articles on: WordPress

Why can't I add my WordPress site

If your WordPress self-hosted site does not get added to Publer due to an error with credentials, even though they are correct, then the issue lies elsewhere.

If you get "Incorrect Credentials" or "Permissions" error but they are correct:



Either you are not using the email that is connected to your respective WordPress account.
Not all the endpoints are accessible by the Rest API.

In that case, you have to speak to a developer, or try the following, in order to make sure that the endpoints are accessible.

Trigger API call from Publer - get error
Go to WP admin, check error logs.
In error logs search for [id "12345"] of the rule
Edit .htaccess and add at the beginning (rule bypass)

<IfModule mod_security.c>
  SecRuleRemoveById 12345
</IfModule>


The endpoints that we call are categories, tags, comments, posts, and media. More specifically, the following are all the endpoints that we call:

GET /categories?number=1000&_fields=id,name
GET /tags?number=1000&_fields=id,name
GET /comments
POST /comments
DELETE /comments/#{comment_id}
GET /media
POST /posts
GET /posts
DELETE /posts/#{post_id}
POST /posts/#{post_id}

After that, you will be able to add the WordPress site to Publer normally.


If you get "You are not currently logged in" error:



You need to enable the API endpoints for users.
Check if you’re using any custom plugins or settings that might be blocking the users endpoint. This endpoint is necessary for fetching authors and enabling you to post on behalf of an author.

You can always perform a manual check for any site issues by using the links provided below:

https://blog.publer.io/wp-json
https://blog.publer.io/wp-json/wp/v2

If either of those links shows an error stating that The REST API is not enabled, it will not work. Otherwise, it should display a normal screen. The REST API is enabled by default, but it may have been disabled by the site’s administrator.

Note: Sometimes, even after following all the steps correctly, the connection to WP may still not work. In such cases, you just need to try again after a few hours or the next day.

Updated on: 13/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!