n8n-nodes-rest-wordpress
v0.1.0
Published
WordPress REST API nodes for n8n
Readme
n8n-nodes-wordpress
WordPress REST API nodes for n8n. This package provides a comprehensive set of nodes to interact with the WordPress REST API.
Features
This node provides access to all major WordPress REST API endpoints:
Resources
- Posts - Create, read, update, delete posts
- Pages - Manage WordPress pages
- Categories - Organize content with categories
- Tags - Tag content for better organization
- Comments - Manage comments
- Media - Upload and manage media files
- Users - User management
- Taxonomies - Access custom taxonomies
- Post Types - Query custom post types
- Post Statuses - Get available post statuses
- Settings - Manage site settings
- Themes - Theme information
- Search - Search across all content
- Block Types - WordPress block editor types
- Blocks - Manage individual blocks
- Plugins - Plugin information
Operations
Each resource supports:
- Get Many - List items with pagination and filtering
- Get - Retrieve specific item by ID
- Create - Create new items
- Update - Modify existing items
- Delete - Remove items
Installation
- Install the package in your n8n instance:
npm install n8n-nodes-wordpressRestart n8n
The WordPress nodes will be available in the node palette
Configuration
Credentials
Create WordPress API credentials:
- Base URL: Your WordPress site URL with
/wp-json(e.g.,https://yoursite.com/wp-json) - Username: WordPress username (optional for public endpoints)
- Password: WordPress application password or REST API key (optional for public endpoints)
Node Configuration
- Resource: Select the WordPress resource you want to work with
- Operation: Choose the operation (Get Many, Get, Create, Update, Delete)
- Parameters: Configure operation-specific parameters
Usage Examples
Get All Posts
- Resource: Post
- Operation: Get Many
- Set filters like status, search term, pagination
Create a New Post
- Resource: Post
- Operation: Create
- Set title, content, status, categories, tags
Upload Media
- Resource: Media
- Operation: Create
- Upload file, set alt text, caption
Search Content
- Resource: Search
- Operation: Get Many
- Enter search query, filter by type
Authentication
The node supports WordPress REST API authentication:
- No Authentication - For public endpoints (get published posts, pages, etc.)
- Basic Authentication - Username + Application Password
- JWT Authentication (if your site supports it)
API Version
This node uses WordPress REST API v2 (/wp/v2/ endpoints).
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run linting
npm run lint
# Fix linting issues
npm run lintfix
# Format code
npm run formatContributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details.
