WordPress Integration
Under maintenancePricing
from $30.00 / 1,000 wordpress post uploads
WordPress Integration
Under maintenanceManage 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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
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
| Action | Description |
|---|---|
pull_posts | Pull WordPress posts and save the run results |
upload_posts | Upload/create WordPress posts from JSON input |
pull_pages | Pull WordPress pages and save the run results |
delete_post | Delete one WordPress post by ID |
test_auth | Test 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.
| Field | Type | Required | Description |
|---|---|---|---|
siteUrl | string | Yes | Full WordPress site URL, for example https://example.com |
username | string | Yes | WordPress username |
appPassword | string | Yes | WordPress Application Password |
action | string | Yes | One of pull_posts, upload_posts, pull_pages, delete_post, test_auth |
postType | string | No | Where to upload content. Use post for normal blog posts, page for website pages, or a custom WordPress content type if your site has one |
postStatus | string | No | Status for uploaded posts: draft, publish, pending, or private |
maxPosts | integer | No | Maximum posts/pages to pull. Use 0 for unlimited |
deletePostId | integer | For delete_post | WordPress post ID to delete |
itemsToPush | array | For upload_posts | Array 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.
- Open your WordPress admin dashboard.
- Go to Users > Profile > Application Passwords.
- Add a new application password, for example
Apify. - Copy the generated password. WordPress shows it only once.
- 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 name | Recommended 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.txtcopy .env.example .envpython src/main.py
For local runs, configure values in .env or create an INPUT.json file.
Deploy to Apify
npm install -g apify-cliapify logincd "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.