I have error when try to post to wordpress

I have this error when create new post to wordpress by node
(My user permission: administrator)

ERROR: Wordpress Error: Sorry, you are not allowed to create posts as this user.

Error: Wordpress Error: Sorry, you are not allowed to create posts as this user.
    at Object.wordpressApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Wordpress/GenericFunctions.js:35:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
1 Like

I’ve done it

You should install plugin " WP-API/Basic-Auth" as instruction in this link:

But you must edit .htaccess by adding these code like this:
(Don’t know why, because I tested before without this)

# n8n user post permission
RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule ^(.) - [E=HTTP_AUTHORIZATION:%1]
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

You could set this in
Below this row:

RewriteEngine On

7 Likes

You should be ok if use this plugin. This help you not config .htaccess manually
Plugin: application password (use password of your created app in profile)

This is really helpful.
I spent the whole day looking for information on how to fix it. :monkey: