WordPress Integration avatar

WordPress Integration

Under maintenance

Pricing

from $30.00 / 1,000 wordpress post uploads

Go to Apify Store
WordPress Integration

WordPress Integration

Under maintenance

Manage WordPress content from Apify. Pull WordPress posts and pages, upload draft or published posts from JSON input, and delete WordPress posts by ID using the WordPress REST API.

Pricing

from $30.00 / 1,000 wordpress post uploads

Rating

5.0

(1)

Developer

New World Scripts

New World Scripts

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Share

Manage WordPress content from Apify using the WordPress REST API. This Actor helps you pull WordPress posts, upload new WordPress posts, pull WordPress pages, and delete WordPress posts by ID.

It is built for WordPress content automation, content migration checks, editorial workflows, backup exports, and simple publishing operations from structured JSON input.

What this Actor does

ActionDescription
pull_postsPull WordPress posts and save the run results
upload_postsUpload/create WordPress posts from JSON input
pull_pagesPull WordPress pages and save the run results
delete_postDelete one WordPress post by ID
test_authTest whether WordPress accepts the username and Application Password

Common use cases

  • Export WordPress posts for review, backup, migration, enrichment, or analysis.
  • Export WordPress pages from a site through the REST API.
  • Upload draft WordPress posts from structured JSON.
  • Publish content to WordPress from automation workflows.
  • Create WordPress posts from prepared titles, HTML content, and optional meta fields.
  • Delete a WordPress post by ID from an Apify run.

Input

The Actor input is configured in the Apify Console. The action field is a dropdown.

FieldTypeRequiredDescription
siteUrlstringYesFull WordPress site URL, for example https://example.com
usernamestringYesWordPress username
appPasswordstringYesWordPress Application Password
actionstringYesOne of pull_posts, upload_posts, pull_pages, delete_post, test_auth
postTypestringNoWhere to upload content. Use post for normal blog posts, page for website pages, or a custom WordPress content type if your site has one
postStatusstringNoStatus for uploaded posts: draft, publish, pending, or private
maxPostsintegerNoMaximum posts/pages to pull. Use 0 for unlimited
deletePostIdintegerFor delete_postWordPress post ID to delete
itemsToPusharrayFor upload_postsArray of post objects with title, content, optional image URLs, and optional meta

Example inputs

Pull WordPress posts

{
"siteUrl": "https://yourwordpresssite.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
"action": "pull_posts",
"maxPosts": 100
}

Pull WordPress pages

{
"siteUrl": "https://yourwordpresssite.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
"action": "pull_pages",
"maxPosts": 50
}

Upload WordPress posts

{
"siteUrl": "https://yourwordpresssite.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
"action": "upload_posts",
"postStatus": "draft",
"itemsToPush": [
{
"title": "New WordPress post from Apify",
"content": "<p>This post was uploaded from Apify input.</p>\n{{image1}}\n<p>Text after the image.</p>",
"featuredImageUrl": "https://picsum.photos/seed/wp-featured-image/1200/800.jpg",
"imageUrls": [
"https://picsum.photos/seed/wp-body-image/900/600.jpg"
],
"imageOptions": [
{
"width": 900,
"alt": "Example image uploaded from Apify"
}
],
"meta": {
"source": "apify"
}
}
]
}

Delete a WordPress post

{
"siteUrl": "https://yourwordpresssite.com",
"username": "admin",
"appPassword": "xxxx xxxx xxxx xxxx xxxx xxxx",
"action": "delete_post",
"deletePostId": 123
}

Output

Apify stores run results in the default run dataset so you can inspect, download, or connect them to another workflow.

Example result for a pulled WordPress post:

{
"id": 123,
"title": "Example WordPress Post",
"content": "<p>Post content...</p>",
"excerpt": "<p>Short excerpt...</p>",
"link": "https://yourwordpresssite.com/example-post/",
"status": "publish",
"date": "2026-05-26T10:30:00",
"meta": {}
}

Example result for an uploaded post:

{
"id": 456,
"title": "New WordPress post from Apify",
"link": "https://yourwordpresssite.com/new-wordpress-post-from-apify/",
"status": "draft",
"action": "created",
"timestamp": "2026-05-26T10:45:00"
}

Image support

Uploaded posts can include images.

Use featuredImageUrl for the main WordPress featured image:

{
"title": "Post with featured image",
"content": "<p>This post has a featured image.</p>",
"featuredImageUrl": "https://example.com/main-image.jpg"
}

Use imageUrls for images that should be uploaded to WordPress and added inside the post body. To control placement, add placeholders in the content:

{
"title": "Post with body images",
"content": "<p>Intro text.</p>\n{{image1}}\n<p>Middle text.</p>\n{{image2}}\n<p>Ending text.</p>",
"imageUrls": [
"https://example.com/image-1.jpg",
"https://example.com/image-2.jpg"
]
}

{{image1}} is replaced by the first URL in imageUrls, {{image2}} is replaced by the second URL, and so on. If an image URL has no matching placeholder, it is added at the end of the post content.

Use imageOptions to control display size and alt text:

{
"title": "Post with sized image",
"content": "<p>Intro text.</p>\n{{image1}}",
"imageUrls": [
"https://example.com/image-1.jpg"
],
"imageOptions": [
{
"width": 700,
"height": 400,
"alt": "Product photo",
"class": "aligncenter"
}
]
}

If the WordPress post content already contains <img> tags, those tags stay in the content. Separate image URLs are uploaded to the WordPress Media Library.

WordPress setup

This Actor uses WordPress Application Passwords with Basic Authentication.

  1. Open your WordPress admin dashboard.
  2. Go to Users > Profile > Application Passwords.
  3. Add a new application password, for example Apify.
  4. Copy the generated password. WordPress shows it only once.
  5. Use your WordPress username and that Application Password in the Actor input.

Do not use your normal WordPress login password, hosting password, or sandbox access code.

Notes and limitations

  • The upload action creates new WordPress posts. It does not update existing posts.
  • WordPress custom post types may require REST API support to be enabled in WordPress.
  • WordPress meta fields must be registered and exposed to the REST API before WordPress will accept them.
  • Image URLs must be publicly accessible so WordPress can download and upload them to the Media Library.
  • Deleting posts uses force=true, which permanently deletes the post instead of moving it to trash.

Monetization events

This Actor supports Apify Pay per event pricing. Configure these event names in the Apify Console if you publish the Actor as a paid Actor:

Event nameRecommended starting price
wordpress-post-pulled$0.002
wordpress-page-pulled$0.002
wordpress-post-uploaded$0.02
wordpress-post-deleted$0.005

The Actor charges these events after a WordPress operation succeeds. Do not manually charge the synthetic apify-actor-start event in code.

Troubleshooting

401 Unauthorized

Check your WordPress username and Application Password. Use the Application Password generated in WordPress admin, not your regular login password.

REST API not available

Open this URL in your browser:

https://yourwordpresssite.com/wp-json/wp/v2/posts

If it does not load, your WordPress REST API may be blocked by a security plugin, firewall, hosting rule, or permalink configuration.

Custom post type does not work

Confirm that the custom post type is exposed in the WordPress REST API. In WordPress code this usually requires show_in_rest: true.

Local development

pip install -r requirements.txt
copy .env.example .env
python src/main.py

For local runs, configure values in .env or create an INPUT.json file.

Deploy to Apify

npm install -g apify-cli
apify login
cd "c:\Wordpress Integration\wordpress-integration"
apify push

After deployment, open the Actor in Apify Console, fill the input form, and run it.

Search phrases this Actor is built for

WordPress Apify integration, WordPress REST API Actor, WordPress post automation, WordPress content automation, upload WordPress posts from JSON, pull WordPress posts, export WordPress pages, delete WordPress post by ID, WordPress publishing automation.