Documentation

WP-CLI

If your web host has WP-CLI installed, you can run the following commands at the command line:

Repost

Runs the Repost command, behaving as if WordPress’ Cron ran the Repost event.

Info icon

Posts, or their Post Types, must have Repost Status(es) defined to be eligible for posting.

Alert icon

By default, the Repost WordPress Cron Event will run daily.  If you prefer to use WP-CLI, either automatically or manually, you’ll want to disable the scheduled WordPress Cron Event to prevent duplicate reposting. Refer to the Repost Settings Documentation to disable the scheduled WordPress Cron Event.

PluginCommand
WordPress to Buffer Prowp wp-to-buffer-pro-repost --post_types=
WordPress to Hootsuite Prowp wp-to-hootsuite-pro-repost --post_types=
WordPress to SocialPilot Prowp wp-to-socialpilot-pro-repost --post_types=
ParameterDescription
--post_types=Optional; one or more Post Types to Repost (Post Types must have Repost Status(es) defined).
--post_types=post: Posts
--post_types=post,page: Posts and Pages
--test_modeOptional; if specified, Reposting will dryrun, meaning that statuses are not sent.  The results are displayed in the console and (if enabled) in the Log.

Bulk Publish

Runs the Bulk Publish command, behaving as if the user has selected WordPress Posts through the Bulk Publish functionality.

Info icon

Posts, or their Post Types, must have Bulk Publish Status(es) defined to be eligible for posting.

This command can be used in one of two ways:

  • Defining the Posts to Bulk Publish to social media, using Post IDs, or
  • Defining query parameters to select Posts to Bulk Publish to social media – for example, all Posts belonging to a given Category, or published within a date range.

Defining Specific Posts

To send specific Posts to social media via Bulk Publishing, use:

PluginCommand
WordPress to Buffer Prowp wp-to-buffer-pro-bulk-publish --ids=1,2
WordPress to Hootsuite Prowp wp-to-hootsuite-pro-bulk-publish --ids=1,2
WordPress to SocialPilot Prowp wp-to-socialpilot-pro-bulk-publish --ids=1,2
ParameterAccepted Value(s)Description
--ids=stringOne or more Post IDs to Bulk Publish.  If defined, no other parameters are required.
--ids=1,2: Bulk Publish Post IDs 1 and 2
--test_modenoneOptional; if specified, Bulk Publishing will dryrun, meaning that statuses are not sent.  The results are displayed in the console and (if enabled) in the Log.

Defining Query Parameters

To send Posts to social media via Bulk Publishing based on query parameters – for example, all Posts belonging to a given Category, or published within a date range:

ParameterAccepted Value(s)Description
--post_type=stringSend Posts to social media belonging to the given Post Type
--start_date=yyyy-mm-ddSend Posts to social media published on or after the given Start Date.
--end_date=yyyy-mm-ddSend Posts to social media published on or before the given End Date.
--authors=integersSend Posts to social media belonging to the given Author ID(s).
--authors=1,2: Bulk Publish Posts where the Author is User ID 1 or 2
--meta_key=stringSend Posts to social media that meet the given Post Meta condition, comprising of the Meta Key, Value and Compare options
--meta_value=stringSend Posts to social media that meet the given Post Meta condition, comprising of the Meta Key, Value and Compare options
--meta_compare==
!=
>
>=
<
<=
LIKE
NOT LIKE
EMPTY
NOT EMPTY
Send Posts to social media that meet the given Post Meta condition, comprising of the Meta Key, Value and Compare options.
--meta_key=example_key --meta_value=1 --meta_compare==:

Bulk Publish Posts where the Post has a Meta Key of example_key, with its value equalling 1.
--meta_key=example_key --meta_value=1 --meta_compare=!=: Bulk Publish Posts where the Post has a Meta Key of example_key, with its value not equalling 1.
--s=stringSend Posts to social media that contain the given search term(s).
--category=integersSend Posts to social media assigned to the given Category Term ID(s).
--category=1,2: Bulk Publish Posts where the Post’s Category matches Term ID 1 or Term ID 2.
--post_tag=integersSend Posts to social media assigned to the given Post Tag Term ID(s).
--post_tag=1,2: Bulk Publish Posts where the Post’s Post Tag matches Term ID 1 or Term ID 2.
--orderby=none
ID
author
title
name
type
date
modified
rand
comment_count
relevance
Defines the order to Bulk Publish Posts found using the above conditions.
--order=asc
desc
Defines the order to Bulk Publish Posts found using the above conditions.
--test_modenoneOptional; if specified, Bulk Publishing will dryrun, meaning that statuses are not sent to social media.  The results are displayed in the console and (if enabled) in the Log.
Info icon

Custom Taxonomies are also supported. Use the same syntax as for Categories and Post Tags, ensuring you use the programmatic name of the Custom Taxonomy.  For example, a Custom Taxonomy registered with the programmatic name of location would use the syntax --location=1,2


Published

Last Updated