WordPress Integration - Auto Publisher avatar

WordPress Integration - Auto Publisher

Pricing

from $0.01 / 1,000 results

Go to Apify Store
WordPress Integration - Auto Publisher

WordPress Integration - Auto Publisher

Automatically publish content to WordPress sites. Schedule posts, manage categories, upload media & sync with your content calendar. REST API & XML-RPC support.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

1

Bookmarked

3

Total users

0

Monthly active users

6 days ago

Last modified

Share

WordPress Integration — Auto-Publisher

Auto-publish content to a WordPress site from any Apify workflow. Creates posts, pages, or custom post types via the WordPress REST API. Optionally uploads a featured image from a URL, sets categories/tags, schedules future publishing, and supports bulk publishing.


Step 2 — Get a WordPress Application Password

You cannot use your normal WordPress login password — the REST API requires an Application Password.

How to create one:

  1. Log into your WordPress admin panel (yoursite.com/wp-admin).
  2. Go to UsersProfile (or UsersYour Profile).
  3. Scroll to the Application Passwords section near the bottom.
  4. Type a name for the app (e.g. "Apify Publisher") and click Add New Application Password.
  5. WordPress shows you a 24-character password with spaces, like xxxx xxxx xxxx xxxx xxxx xxxx. Copy it now — you can't see it again.
  6. Paste it into the actor's applicationPassword field. Spaces are fine, leave them in.

If you don't see "Application Passwords" on your profile page:

  • Self-hosted WordPress: Application Passwords are built in since WP 5.6. If hidden, your host or a security plugin (Wordfence, iThemes Security, Solid Security) may have disabled them. Re-enable in the plugin's settings, or have your admin do it.
  • WordPress.com: Application Passwords work on Business and higher plans only. Free and Personal plans don't expose the REST API for posting.
  • WP Engine: Enabled by default. No special setup needed.

The user the password belongs to needs publishing permission for the post type you're targeting (Author, Editor, or Administrator role for posts; capabilities for custom post types depend on your setup).


Step 3 — Publish a single post

{
"siteUrl": "https://yourblog.com",
"username": "your-wp-username",
"applicationPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
"title": "My First Post via Apify",
"content": "<p>Hello world. HTML is supported here.</p>",
"status": "draft",
"postType": "post"
}

status controls visibility:

ValueMeaning
draftSaved as draft, not visible to public. Recommended for first run.
publishGoes live immediately
pendingSubmitted for editorial review
privateVisible only to logged-in admins/editors
futureScheduled — also requires publishDate (see below)

Always test with draft first. Once you confirm the post appears correctly in your WP admin, switch to publish.


Step 4 — Optional features

Provide a public image URL — the actor downloads it, uploads it to your WordPress Media Library, and sets it as the post's featured image.

{
"title": "...",
"content": "...",
"featuredImageUrl": "https://images.example.com/cover.jpg"
}

Or, if the image is already in your Media Library, pass its ID instead:

{
"featuredMediaId": 4521
}

Categories and tags

Pass arrays of IDs (integers), not names. To find IDs, go to WP admin → Posts → Categories (or Tags), hover over the row, and grab the tag_ID=N from the URL.

{
"categories": [12, 45],
"tags": [3, 88, 102]
}

Scheduled publishing

{
"status": "future",
"publishDate": "2026-12-25T10:00:00"
}

ISO 8601 format. Use your WordPress site's timezone (set in WP admin → Settings → General).

Custom post types

If your site has a custom post type (CPT) like product, case_study, or event:

{
"postType": "custom",
"customPostType": "case_study"
}

The CPT must be registered with show_in_rest: true in your theme/plugin code, otherwise the REST API can't write to it.

Bulk publishing

Publish many posts in a single run:

{
"siteUrl": "https://yourblog.com",
"username": "...",
"applicationPassword": "...",
"bulkPosts": [
{ "title": "Post 1", "content": "<p>One</p>", "status": "publish" },
{ "title": "Post 2", "content": "<p>Two</p>", "status": "draft" },
{ "title": "Post 3", "content": "<p>Three</p>" }
]
}

When bulkPosts is present, top-level title/content are ignored. Each post can have its own excerpt, categories, tags, customFields, and status. Posts publish sequentially with a small delay to avoid rate-limiting.


Input parameters

ParameterTypeDefaultRequiredDescription
siteUrlstringyes (real run)Your WordPress URL, e.g. https://yourblog.com. No trailing slash needed.
usernamestringyes (real run)WordPress username with publishing permission.
applicationPasswordstring (secret)yes (real run)Application Password from your WP profile. Not your login password.
postTypestring"post"nopost, page, or custom.
customPostTypestringwhen postType=customSlug of the custom post type, e.g. case_study.
titlestringyes (single)Post title.
contentstringyes (single)Post body. HTML supported.
excerptstringnoManual excerpt/summary.
statusstring"draft"nopublish, draft, pending, private, future.
categoriesarray of intsnoCategory IDs.
tagsarray of intsnoTag IDs.
featuredMediaIdintegernoExisting Media Library ID.
featuredImageUrlstringnoPublic image URL — uploaded as featured image.
authorintegernoWordPress user ID for the post's author.
publishDatestringwhen status=futureISO 8601 date in your site's timezone.
customFieldsobjectnoKey/value meta fields. The keys must be registered for REST in WP.
bulkPostsarray of objectsnoBulk publish — overrides single-post title/content.
webhookUrlstringnoPOST results to a webhook (Zapier, Make, n8n, custom).

Pricing

Pay-per-event:

EventPrice
Each post successfully published$0.02

Troubleshooting

"Missing required input: siteUrl, username, applicationPassword"

rest_cannot_create / 401 Unauthorized

The Application Password is wrong, expired, or belongs to a user who can't publish that post type. Double-check:

  • The password was copied with all 24 characters (the spaces between groups are part of it).
  • The user account the password belongs to has the right role (Author for posts is fine; Editor or Administrator for everything).
  • The password hasn't been revoked. Go back to Users → Profile → Application Passwords and confirm it's still listed.

rest_no_route / 404

Your WordPress site has the REST API disabled. Re-enable it in your security plugin (Wordfence's "Disable REST API" feature is the most common cause). To test: open https://yoursite.com/wp-json/ in a browser. You should see a JSON response describing your site. If you get a 404 or HTML, the REST API is blocked.

"Failed to upload media"

The featured image URL didn't work. Make sure:

  • The URL is publicly reachable (test by opening it in a browser incognito tab).
  • The image is JPG, PNG, or GIF — other formats may be rejected by your WP media settings.
  • Your user has upload_files capability (Author and above by default).

Post created but featured image is missing

The image upload succeeded but WordPress didn't accept the media ID for the post. This usually means the post type doesn't have thumbnail support enabled (add_theme_support('post-thumbnails') in the theme). Edit your theme or use a CPT that has thumbnail support.

wp.com site rejects the request

WordPress.com sites don't expose Application Passwords for content creation on Free or Personal plans. You need a Business plan or higher, or a self-hosted WP install.

post_status of future returned a draft

You set status: "future" but publishDate was missing or in the past. WordPress silently downgrades to draft. Provide an ISO 8601 date in the future, in your site's configured timezone.

How do I test without an API key?

Run the actor without credentials, or set demoMode to true. The run returns a labeled sample shaped like real output: every item includes demo: true and a _notice field explaining that it is sample data. Sample runs charge no task events. Provide your own API credentials in the input to receive live data.


Built by John Rippy | Actor Arsenal