Skip to main content

Overview

The WordPress connector uses the WordPress REST API with Application Password authentication to publish articles directly to your WordPress site. It supports:
  • Full article publishing with HTML formatting
  • Category, tag, and author synchronization
  • Featured image upload to WordPress Media Library
  • Scheduled publishing
  • Article updates and deletions

Prerequisites

Before connecting, ensure your WordPress site has:
  1. WordPress 5.6+ (for Application Passwords support)
  2. REST API enabled (enabled by default)
  3. SSL certificate (HTTPS) - recommended for security
  4. User account with Editor or Administrator role

Setup Guide

Step 1: Create an Application Password

  1. Log in to your WordPress admin dashboard
  2. Go to Users → Your Profile
  3. Scroll down to Application Passwords
  4. Enter a name for the application (e.g., “Skayle”)
  5. Click Add New Application Password
  6. Copy the generated password immediately - it won’t be shown again
Application Passwords are different from your regular WordPress password. They’re 24-character strings with spaces that provide API-only access.

Step 2: Configure in Skayle

  1. Go to Settings → Connectors in Skayle
  2. Select WordPress as your connector type
  3. Enter your configuration:
FieldDescriptionExample
Site URLYour WordPress site URLhttps://example.com
UsernameYour WordPress usernameadmin
Application PasswordThe password from Step 1xxxx xxxx xxxx xxxx xxxx xxxx
Default Author ID(Optional) WordPress user ID for posts1
Default Category ID(Optional) Fallback category ID1
  1. Click Test Connection to verify

Step 3: Sync Taxonomies

After connecting, sync your existing WordPress taxonomies:
Click Sync from CMS to import:
  • All categories
  • All tags
  • All users with author/editor/administrator roles
This creates corresponding items in Skayle and establishes mappings.

Configuration Options

interface WordPressConnectorConfig {
  type: "wordpress";
  siteUrl: string;           // WordPress site URL
  username: string;          // WordPress username
  applicationPassword: string; // Application Password
  defaultAuthorId?: number;  // Default author for posts
  defaultCategoryId?: number; // Default category for posts
}

API Endpoints Used

The WordPress connector uses these REST API endpoints:
EndpointMethodPurpose
/wp-json/wp/v2/postsPOSTCreate new post
/wp-json/wp/v2/posts/{id}PUTUpdate existing post
/wp-json/wp/v2/posts/{id}DELETEDelete post
/wp-json/wp/v2/categoriesGET/POSTSync categories
/wp-json/wp/v2/tagsGET/POSTSync tags
/wp-json/wp/v2/usersGETSync authors
/wp-json/wp/v2/mediaPOSTUpload featured images

Content Formatting

Skayle converts BlockNote JSON content to WordPress-compatible HTML:

Supported Elements

BlockNote TypeWordPress Output
Paragraph<p>
Heading (1-6)<h1> - <h6>
Bullet List<ul><li>
Numbered List<ol><li>
Blockquote<blockquote>
Code Block<pre><code>
Image<img> with alt text
Link<a href="">
Bold<strong>
Italic<em>
Underline<u>
Strikethrough<del>

HTML Sanitization

The connector sanitizes HTML before sending to WordPress:
  • Removes <script> tags
  • Removes event handlers (onclick, onload, etc.)
  • Removes javascript: URLs
  • Preserves safe HTML tags and attributes

Taxonomy Mapping

Categories

When publishing, Skayle maps article categories to WordPress category IDs:
  1. Looks up the Skayle category in the taxonomy mapping table
  2. Uses the mapped WordPress category ID
  3. Falls back to defaultCategoryId if no mapping exists

Tags

Tags are mapped similarly:
  1. Looks up each Skayle tag in the mapping table
  2. Uses mapped WordPress tag IDs
  3. Tags without mappings are skipped

Authors

Author mapping:
  1. Checks if article author has a WordPress mapping
  2. Uses mapped WordPress user ID
  3. Falls back to defaultAuthorId if no mapping exists
The connector handles featured images in two ways:
  1. External URLs: If the image is hosted externally, WordPress will use the URL directly (if your theme supports it)
  2. Upload to Media Library: For better compatibility, images can be uploaded to WordPress Media Library
Image upload to WordPress Media Library requires the user to have upload_files capability.

Troubleshooting

Connection Failed

  • Verify your username is correct
  • Regenerate the Application Password
  • Ensure the user has Editor or Administrator role
  • Check if REST API is enabled
  • Verify no security plugin is blocking the API
  • Ensure your IP isn’t blocked
  • Verify the Site URL is correct
  • Check if permalinks are enabled (Settings → Permalinks)
  • Ensure /wp-json/ endpoint is accessible
  • Ensure your site has a valid SSL certificate
  • Check if the certificate is expired
  • Verify the certificate chain is complete

Publishing Issues

  • Check if the post status is set correctly
  • Verify the publish date isn’t in the future
  • Check WordPress for draft posts
  • Run taxonomy sync first
  • Check the taxonomy mapping table
  • Verify categories/tags exist in WordPress

Security Best Practices

Never share your Application Password. It provides full API access to your WordPress site.
  1. Use HTTPS: Always use SSL for your WordPress site
  2. Limit user permissions: Create a dedicated user for Skayle with only necessary permissions
  3. Rotate passwords: Periodically regenerate Application Passwords
  4. Monitor access: Check WordPress logs for unusual API activity
  5. Revoke when needed: Delete the Application Password if you disconnect Skayle

Next Steps