diff --git a/docs/nodes/credentials/WordPress/README.md b/docs/nodes/credentials/WordPress/README.md index 7bed05f46..ac7ea9c10 100644 --- a/docs/nodes/credentials/WordPress/README.md +++ b/docs/nodes/credentials/WordPress/README.md @@ -9,8 +9,9 @@ You can find information about the operations supported by the WordPress node on ## Prerequisites -Create a [WordPress](https://wordpress.com/) account. +- Create a [WordPress](https://wordpress.com/) account. +- Install and activate the [WP-API/Basic-Auth](https://github.com/WP-API/Basic-Auth) plugin in the WordPress website. ## Using Username and Password -Use your username, password and wordpress URL with your WordPress node credentials in n8n. +Use your username, password and WordPress URL with your WordPress node credentials in n8n. diff --git a/docs/nodes/nodes-library/nodes/WordPress/README.md b/docs/nodes/nodes-library/nodes/WordPress/README.md new file mode 100644 index 000000000..e83d39e60 --- /dev/null +++ b/docs/nodes/nodes-library/nodes/WordPress/README.md @@ -0,0 +1,60 @@ +--- +permalink: /nodes/n8n-nodes-base.wordpress +--- + +# WordPress + +[WordPress](https://wordpress.org/) is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. + +::: tip 🔑 Credentials +You can find authentication information for this node [here](../../../credentials/WordPress/README.md). +::: + +## Basic Operations + +- Post + - Create a post + - Get a post + - Get all posts + - Update a post +- User + - Create a user + - Get a user + - Get all users + - Update a user + +## Example Usage + +This workflow allows you to create a post and update the post in WordPress. You can also find the [workflow](https://n8n.io/workflows/668) on the website. This example usage workflow would use the following two nodes. +- [Start](../../core-nodes/Start/README.md) +- [WordPress]() + +The final workflow should look like the following image. + +![A workflow with the WordPress node](./workflow.png) + +### 1. Start node + +The start node exists by default when you create a new workflow. + +### 2. Wordpress node (create: post) + +1. First of all, you'll have to enter credentials for the WordPress node. You can find out how to do that [here](../../../credentials/WordPress/README.md). +2. Enter the title in the ***Title*** field. +3. Click on ***Execute Node*** to run the workflow. + +![Using the WordPress node to create a new post](./WordPress_node.png) + +::: v-pre +### 3. Wordpress1 node (update: post) + +1. Select the credentials that you entered in the previous node. +2. Select 'Update' from the ***Operation*** dropdown list. +3. Click on the gears icon next to the ***Post ID*** field and click on ***Add Expression***. +4. Select the following in the ***Variable Selector*** section: Nodes > Wordpress > Output Data > JSON > id. You can also add the following expression: `{{$node["Wordpress"].json["id"]}}`. +5. Click on the ***Add Field*** button and select 'Content' from the dropdown list. +6. Enter the content in the ***Content*** filed. +7. Click on ***Execute Node*** to run the workflow. +::: + +![Using the WordPress node to update the post](./WordPress1_node.png) diff --git a/docs/nodes/nodes-library/nodes/WordPress/WordPress1_node.png b/docs/nodes/nodes-library/nodes/WordPress/WordPress1_node.png new file mode 100644 index 000000000..c815f1619 Binary files /dev/null and b/docs/nodes/nodes-library/nodes/WordPress/WordPress1_node.png differ diff --git a/docs/nodes/nodes-library/nodes/WordPress/WordPress_node.png b/docs/nodes/nodes-library/nodes/WordPress/WordPress_node.png new file mode 100644 index 000000000..e12d0b39d Binary files /dev/null and b/docs/nodes/nodes-library/nodes/WordPress/WordPress_node.png differ diff --git a/docs/nodes/nodes-library/nodes/WordPress/workflow.png b/docs/nodes/nodes-library/nodes/WordPress/workflow.png new file mode 100644 index 000000000..e168fc9df Binary files /dev/null and b/docs/nodes/nodes-library/nodes/WordPress/workflow.png differ