Biggest deals of the year. 30-day money-back guarantee. Limited time deals. 24/7 support. Don't miss out

How to automate WordPress with n8n

Nov 24, 2026 7 min Read
By Aris S.
How to automate WordPress with n8n

WordPress provides a graphical admin dashboard that lets you build, deploy, and manage websites easily without coding. While already efficient by itself, you can integrate WordPress with the low-code automation platform n8n to fully automate your website administration tasks.

If you already have both platforms set up, most WordPress-n8n integrations consist of only four easy steps:

  1. Generate WordPress REST API credentials using an admin account.
  2. Create the basic WordPress workflow in n8n.
  3. Add and configure the WordPress node.
  4. Test the workflow to verify functionality.

Integrating WordPress with n8n lets you automate various tasks. For example, you can automatically create posts with AI, share new content on social media, tag blog articles, and categorize posts without human intervention.

Explore how to automate WordPress with n8n in more detail below.

Prerequisites for connecting WordPress to n8n

Before connecting WordPress to n8n, make sure you have a running n8n instance, a deployed WordPress website using HTTPS, and a WordPress administrator account.

If you’re using Hostinger, set up Hostinger’s self-hosted n8n from Managed apps in Hostinger dashboard. n8n runs on its own dedicated microVM, while Hostinger manages the underlying server, security, and updates. You retain root access through SSH or the web console.

For this workflow, use a WordPress administrator account because the automation creates new WordPress users.

In WordPress, go to Settings → General and confirm that New User Default Role is set to Subscriber, because the workflow is specifically supposed to create subscriber accounts.

Next, check whether your WordPress REST API is reachable by opening:

https://domain.tld/wp-json

If the browser returns JSON data, the REST API is reachable. A 401 Unauthorized or 403 Forbidden response does not necessarily mean the REST API is disabled.

Check that the site uses HTTPS and review security plugins, firewall rules, custom code, and proxy settings that may block REST API requests or remove the Authorization header.

WordPress Application Passwords are available by default for sites served over HTTPS unless a plugin or custom code disables them.

How to set up WordPress integration with n8n?

The steps to connect WordPress with n8n are as follows.

1. Generate WordPress REST API credentials

An application password authenticates external platforms, like n8n, to access and exchange data with your site via the WordPress REST API. It enables you to complete tasks on your website without directly interacting with the admin dashboard.

Here’s how to create an application password. Note that it’ll only be valid for the account that generated it:

  1. Open your website’s WordPress admin dashboard and navigate to the Sidebar → Users → Profile.
  1. Scroll down to the Application Passwords section.
  2. Enter a name for your application password, preferably something descriptive like n8n-create-post.
  3. Hit Add Application Password.
  1. Copy the application password and store it in a safe location.
Important

Important! For security reasons, you won’t be able to access your WordPress application password again after closing the profile page. Make sure you’ve made a note of it before proceeding.

We’ll use this application password later when configuring the WordPress node. First, let’s create our workflow.

2. Create your WordPress workflow in n8n

Before integrating WordPress into n8n, you need to create a workflow to define the data the CMS will process.

You can develop various WordPress workflows depending on your needs, and the n8n integration steps will remain largely similar. For this tutorial, we’ll make a simple automation system that creates a new subscriber account when a user signs up using a form.

To start, follow these steps to configure the On form submission node to collect user data and start your workflow when users submit their contact details:

  1. Log in to n8n and click the Create Workflow button on the main screen.
  1. On your n8n canvas, click the + icon.
  2. Add the On form submission trigger node.
  3. The node configuration menu will open. Enter a name and description for your form.
  4. Click Add form element to add fields to your form. Add four fields named Username, First name, Last name, and Email address.
  5. Enable Required Field for each field so every workflow execution receives the values used later. WordPress itself requires the username, email address, and password when creating a user.
  1. Click the X button in the top right to close the configuration window.

Next, you’ll need the Crypto node to generate a random password for the new WordPress user by following these steps:

  1. Add the Crypto node to your workflow, directly connected to the trigger.
  2. Set the Property Name to Password.
  3. Set the Crypto node action to Generate a random string, then set Type to BASE64 and Length to 24.
  4. Adjust the Length setting to determine the password length. We’ll use 24.

3. Add and configure the WordPress node

After creating the workflow, you’ll need to integrate and configure the WordPress node.

In n8n, each node is reserved for a specific action or purpose. Some workflows might require multiple WordPress or non-WordPress nodes.

For this workflow, you’ll only need to set up the WordPress create a user node like so:

  1. Click the + icon on your n8n canvas and select the WordPress create a user node.
  2. From the Credential to connect with drop-down, click Create new credential.
  3. Enter your admin account’s username, the application password generated earlier, and the URL of your WordPress website.
  1. In Username, map the username submitted through the form:
{{ $('On form submission').item.json.Username }}
  1. In Name, combine the submitted first and last names:
{{ $('On form submission').item.json["First name"] + ' ' + $('On form submission').item.json["Last name"] }}
  1. In First Name, use:
{{ $('On form submission').item.json["First name"] }}
  1. In Last Name, use:
{{ $('On form submission').item.json["Last name"] }}
  1. In Email, use:
{{ $('On form submission').item.json["Email address"] }}
  1. In Password, use the random password generated by the Crypto node:
{{ $('Crypto').item.json.Password }}

After the WordPress node creates the new user, add a Gmail node to send the welcome message.

  1. Click the + icon after the WordPress node and add Gmail → Send a message.
  2. Under Credential to connect with, select Create new credential and connect your Gmail account.
  1. In To, use:
{{ $('On form submission').item.json["Email address"] }}
  1. Add a subject such as:
Welcome to our blog, {{ $('On form submission').item.json["First name"] }}!
  1. Write the welcome message, then click Test step to confirm that the email is sent after WordPress creates the user.

4. Test the full workflow

To test your workflow to verify that it works properly, hit the Execute Workflow button and enter your details into the pop-up form, as users would.

If everything works correctly, your workflow should turn green. The email address you entered in the form will receive the welcome message, and a new user account will appear in your WordPress instance.

If your workflow encounters an error, a red warning sign will appear. Here are some common issues and their solutions:

  • Invalid credentials. Using invalid credentials prevents n8n from connecting to other applications and using their services. Check each node’s credentials to ensure you entered the correct details.
  • Insufficient permission. Setting up the WordPress node using a non-admin account can cause an error because it doesn’t have the permission to create a new user. Check the credential configuration to ensure you’ve connected an administrator-level account.
  • Wrong expression. Using incorrect expressions can cause the nodes to pass incorrect or empty values. Check each node’s input and output panes to verify that you’ve forwarded the correct data.

Using expressions in n8n

Instead of manually writing expressions, you can select specific data from previous nodes by dragging and dropping it from the input pane to a field.

After verifying the workflow, save your changes and click Publish to make the production version live.

What can you automate with WordPress and n8n?

Integrating different nodes allows you to create WordPress workflows for various tasks. In addition to user creation, you can streamline post generation, publishing, tagging, and categorization.

If you use Hostinger’s self-hosted n8n, deploy it from Managed apps in Hostinger dashboard and start building your workflows from the preinstalled n8n instance.

Generating posts with AI

By combining WordPress and an AI agent, you can use n8n to generate content. This lets you automate time-consuming tasks like formatting articles and brainstorming topics, improving production efficiency.

To generate a WordPress post using n8n and AI, integrate the WordPress create a post node into your workflow by following these steps:

  1. Add the On schedule node that will start your workflow at a specified interval.
  2. Insert the OpenAI Message a model node to generate a topic for your post.
  3. Integrate the Google Sheets Get row node into n8n to fetch previously written topics.
  4. Set up the Aggregate and If nodes to determine whether the generated topic has already been written. Loop the true condition back to the OpenAI node to regenerate the topic if it already exists in the sheet.
  5. Add the Google Sheets append row node to update the topic list with the newly generated one.
  6. Connect another OpenAI Message a model node, but set it up to write content based on the given topic.
  7. Finish by adding the WordPress create a post node, which will take the AI-generated content and format it into a post draft.

Here’s how the completed workflow should look:

Publishing posts to social media

Integrating n8n with various social media applications can allow you to create a workflow that automatically shares WordPress posts after publication.

To create this workflow, combine the WordPress fetch a post and social media nodes. The steps look like this:

  1. Add the Manual trigger node, which initiates the workflow when the user clicks Test workflow on n8n.
  2. Insert the Google Sheets Get row node to retrieve the WordPress Post ID from a predetermined sheet.
  3. Connect the WordPress get posts node to fetch the corresponding post content using the ID retrieved from the sheet.
  4. Add the Social media manager node to implement an AI model for analyzing the WordPress content and generating captions for social media posts.
  5. Include the Publish on X node to share the WordPress post on this platform.
  6. Insert the LinkedIn node to upload the post to your timeline.
  7. Connect the Publish on Facebook node to share the post.
  8. Add the Google Sheets Update row node to mark the posts as published.

The finished workflow looks something similar to this:

Tagging blog posts with automatically

n8n is especially helpful for time-intensive tasks like assigning WordPress tags and categories to posts. You can automate the process by fetching the metadata via the REST API and assigning it to existing content using n8n’s Update a post node.

We’ll explain how to categorize content automatically in the next section. Here, let’s explore how to configure a workflow for tagging WordPress posts automatically:

  1. Add the Manual trigger node to start the workflow with a press of a button.
  2. Connect the HTTP request node to fetch all the tags using the WordPress API endpoint.
  3. Insert the WordPress get post node to fetch all the posts.
  4. Set a filtering rule using the If node to check for posts without a tag.
  5. Use the Switch node to filter the untagged articles based on their topic or title.
  6. Add the WordPress update a post node for each post topic or title to assign the corresponding tag.

An example of a finished workflow looks like the following:

Categorizing blog posts with AI

The WordPress workflows for categorizing posts using n8n are subject to the same logic as adding a tag. The difference is that it involves an additional node for analyzing content using AI to determine the most fitting category.

Here’s how to set up the workflow:

  1. Add the Manual trigger node to start the workflow only when needed.
  2. Connect the WordPress get post node to fetch all existing content.
  3. Insert the AI agent node, which will read through the fetched posts to determine categories they may belong to.
  4. Add your preferred AI model to the AI agent node and select a large language model (LLM).
  5. Enter a prompt to ask the AI model to check the WordPress post content and categorize it.
  6. Connect the WordPress update post node at the end of your workflow to change the post category.

A completed workflow will look like this auto-categorize n8n template from Keith Rumjahn:

What else can I automate with n8n besides WordPress

After successfully integrating WordPress, we recommend connecting other nodes and applications to further explore the possibilities of what you can automate with n8n.

By understanding n8n more in depth, you can create other WordPress workflows for more complex tasks. For example, you can add a customer relationship management (CRM) application to your automation system to send a newsletter to new blog subscribers.

If you want to explore n8n and create more workflows, Hostinger is an excellent place to start. We have a comprehensive catalog of automation tutorials to help you kickstart your journey.

This article is a localized version of How to automate WordPress with n8n, originally published in English.

Aris is a Content Writer specializing in Linux and WordPress development. He has a passion for networking, front-end web development, and server administration. By combining his IT and writing experience, Aris creates content that helps people easily understand complex technical topics to start their online journey. Follow him on LinkedIn.