Wordpress Administrator Access (not using WordPressAPI)

I’m trying to access WordPress administrator pages and links directly within my flows. I can use the WordPres API and the WooCommerce API, but there are things that I would like to scrap or access that are not available in the APIs.

I have an admin level user - but whenever I try a HTTP request - the response is just the WordPress login page.

Has anyone a way to access the WordPress Admin pages directly through a HTTP request in n8n?

  • n8n version: 1.47.3
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @dbaldaro,

Welcome to the community :raised_hands:

You would need to send an authentication request first, The best way to find out how to do that is to open your browsers dev tools, log in and look at the requests in the network tab.

Just don’t make sure you don’t share the data from that tab as one of the requests will contain your username and password. The other issue you will likely run into is the wordpress admin panel may require javascript to be enabled which will prevent us from scraping it so you would need to look at something like Browserless or Puppeteer to get the job done.

Thanks - trying to following some examples of accessing WP even from curl - so I can then try and import into my http node - but even they fail. Just seem to either keep being redirected to the login page or get a message saying, ‘too many requests’ - even though I am hardly making evn request! So frustrating! Does anyone have a working example of this?

You need to log in with an HTTP Request Node, grab the wordpress session cookie and then pass that to subsequent requests for authentication. Since you’re already admin of the installation, I wonder if you wouldn’t be better off just connecting to the MySQL database correctly to do your thing?

Hard to explain - but there are plugins that produces files directly in the admin interface - and are only available to download while I am logged in. I want to automate grabbing these files.
I get to a point where the http request to post the login credentials gets returned a 302 - but I get nothing else back, just the status “302” - confused!

Hey @dbaldaro,

If you are getting the 302 in the HTTP Request node you can try setting the follow redirects option under the settings.