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.
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.
wp wp-to-buffer-pro-repost --post_types=
Parameter | Description |
---|---|
--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_mode |
Optional; if specified, Reposting will dryrun, meaning that statuses are not sent to Buffer. 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.
Posts, or their Post Types, must have Bulk Publish Status(es) defined to be eligible for posting to Buffer.
This command can be used in one of two ways:
- Defining the Posts to Bulk Publish to Buffer, using Post IDs, or
- Defining query parameters to select Posts to Bulk Publish to Buffer – for example, all Posts belonging to a given Category, or published within a date range.
Bulk Publish: Defining Specific Posts
To send specific Posts to Buffer via Bulk Publishing, use:
wp wp-to-buffer-pro-bulk-publish --ids=1,2
Parameter | Accepted Value(s) | Description |
---|---|---|
--ids= |
string |
One 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_mode |
none |
Optional; if specified, Bulk Publishing will dryrun, meaning that statuses are not sent to Buffer. The results are displayed in the console and (if enabled) in the Log. |
Bulk Publish: Defining Query Parameters
To send Posts to Buffer via Bulk Publishing based on query parameters – for example, all Posts belonging to a given Category, or published within a date range – use:
wp wp-to-buffer-pro-bulk-publish --post_type=post --start_date=...
Parameter | Accepted Value(s) | Description |
---|---|---|
--post_type= |
string |
Send Posts to Buffer belonging to the given Post Type |
--start_date= |
yyyy-mm-dd |
Send Posts to Buffer published on or after the given Start Date. |
--end_date= |
yyyy-mm-dd |
Send Posts to Buffer published on or before the given End Date. |
--authors= |
integers |
Send Posts to Buffer belonging to the given Author ID(s).--authors=1,2 : Bulk Publish Posts where the Author is User ID 1 or 2 |
--meta_key= |
string |
Send Posts to Buffer that meet the given Post Meta condition, comprising of the Meta Key, Value and Compare options |
--meta_value= |
string |
Send Posts to Buffer that meet the given Post Meta condition, comprising of the Meta Key, Value and Compare options |
--meta_compare= |
= |
Send Posts to Buffer 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= |
string |
Send Posts to Buffer that contain the given search term(s). |
--category= |
integers |
Send Posts to Buffer 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= |
integers |
Send Posts to Buffer 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 |
Defines the order to Bulk Publish Posts found using the above conditions. |
--order= |
asc |
Defines the order to Bulk Publish Posts found using the above conditions. |
--test_mode |
none |
Optional; if specified, Bulk Publishing will dryrun, meaning that statuses are not sent to Buffer. The results are displayed in the console and (if enabled) in the Log. |
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