Exporting Posts From WordPress
This task will export posts from WordPress in an XML format. The results can be filtered if required. See below for a sample output file.
Settings
Connection
Required
The WordPress connection to use when running the Export Posts task.
Category
Optional
Limits the posts returned based on the category slug. Leave blank to export posts with any category.
Export All
Required
Set to true to export all posts, or false to only export those published since the date specified in the 'Export From' setting.
Export Detailed
Required
Set to true to export the related author, categories and tags for each post. When set to false, only the ID of the author, categories and tags will be downloaded. Please note that setting this to true will significantly increase the amount of time the export takes.
Export From
Required
When the 'Export All' setting is false, only posts published after this date will be exported. This date will update automatically each time the task runs.
Page Size
Required
The number of records to include in each page of results. Defaults to 10. Increasing this value will increase the speed of the export, but will consume more memory.
Search
Optional
Enter search keywords to filter the results returned.
Status
Optional
Limits the posts returned based on status. Leave blank to export posts with any status.
Tag
Optional
Enter search keywords to filter the results returned.
Timeout
Optional
The maximum time, in seconds, to wait for a response from WordPress. Leave blank to use the default timeout of 100 seconds.
Output File
Required
The file to save results from the Export Posts task. The results are returned as an array of the Post object as detailed in the example below.
Zynk Settings
Examples
A sample output file is shown below.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfPost xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Post>
<id>31</id>
<external_id>12345</external_id>
<link>https://localhost/wordpress/a-post/</link>
<date>2016-08-02T16:31:53</date>
<date_gmt>2016-08-02T15:31:53</date_gmt>
<modified>2016-08-31T15:59:40</modified>
<modified_gmt>2016-08-31T14:59:40</modified_gmt>
<slug>a-post</slug>
<type>post</type>
<title>
<rendered>a post</rendered>
</title>
<author_id>1</author_id>
<author>
<id>1</id>
<name>admin</name>
<url />
<description />
<link>https://localhost/wordpress/author/admin/</link>
<slug>admin</slug>
<registered_date xsi:nil="true" />
<avatar_urls>
<item>
<key>24</key>
<value>https://secure.gravatar.com/avatar/02f0389f39fb5b37a548110c961725a1?s=24&d=mm&r=g</value>
</item>
<item>
<key>48</key>
<value>https://secure.gravatar.com/avatar/02f0389f39fb5b37a548110c961725a1?s=48&d=mm&r=g</value>
</item>
<item>
<key>96</key>
<value>https://secure.gravatar.com/avatar/02f0389f39fb5b37a548110c961725a1?s=96&d=mm&r=g</value>
</item>
</avatar_urls>
</author>
<featured_media>0</featured_media>
<comment_status>open</comment_status>
<ping_status>open</ping_status>
<format>standard</format>
<sticky>false</sticky>
<categories>
<Category>
<id>9</id>
<count>1</count>
<description />
<link>https://localhost/wordpress/category/parent-category/child-category/</link>
<name>Child Category</name>
<slug>child-category</slug>
<taxonomy>category</taxonomy>
<parent>8</parent>
</Category>
<Category>
<id>8</id>
<count>1</count>
<description />
<link>https://localhost/wordpress/category/parent-category/</link>
<name>Parent Category</name>
<slug>parent-category</slug>
<taxonomy>category</taxonomy>
<parent>0</parent>
</Category>
<Category>
<id>1</id>
<count>2</count>
<description />
<link>https://localhost/wordpress/category/uncategorised/</link>
<name>Uncategorised</name>
<slug>uncategorised</slug>
<taxonomy>category</taxonomy>
<parent>0</parent>
</Category>
</categories>
<tags>
<Tag>
<id>10</id>
<count>1</count>
<description />
<link>https://localhost/wordpress/tag/news/</link>
<name>news</name>
<slug>news</slug>
<taxonomy>post_tag</taxonomy>
</Tag>
</tags>
</Post>
</ArrayOfPost>