Content Hub includes several Drush commands for both normal product use and for more advanced administration. You can use the commands to administer your content from the command line. For more information about Drush, see Introduction to Drush.
Note
Drush versions 10.3.3 and later have enhanced queue handling that improves the export and import processes in Content Hub.
Drush commands
Drush commands | Description | Introduced in module version | Drush 9.x compatible | Drush 10.x compatible | Drush 11.x compatible | Site role | Notes |
---|---|---|---|---|---|---|---|
acquia:contenthub:reoriginate | Re-originates entities in Content Hub from one source to another. | 3.1.0 | ✓ | ✓ | ✓ | Publisher | See arguments |
acquia:contenthub:reindex | Initiates a re-indexing operation in Content Hub. | 3.1.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub:entity-scan:orphaned | Scans Content Hub for orphaned entities and displays the ones that are not associated with any registered client. | 3.1.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-update-client-metadata | Updates the client metadata in the Content Hub service. | 3.3.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-dashboard-allowed-origins | Retrieves the publisher-registered webhooks and stores them within the Drupal configuration. | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:sync-interests | Synchronizes the interests list of a webhook with the entity tracking tables. | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-webhook-interests-delete | Deletes interests from a webhook. | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-webhook-interests-add | Adds interests to a webhook. | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub:client-delete | Deletes clients using names or UUIDs. | 3.7.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub:client-update | Updates the Content Hub details. | 3.4.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-webhook-interests-list | Displays the list of interest for the registered webhook. | 3.3.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-webhooks-list | Displays the list of registered webhooks. | 3.5.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-import-queue-run | Runs the Content Hub subscriber import queue. | 3.3.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub-export-queue-run | Runs the Content Hub publisher export queue. | 3.3.0 | ✓ | ✓ | ✓ | Publisher | See arguments |
acquia:contenthub:enable-syndication | Enables syndication for a comma-separated list of UUIDs. | 3.3.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub:disable-syndication | Disables syndication for a comma-separated list of UUIDs. | 3.3.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub-audit-publisher | Checks the published entities and compares them with the publisher to ensure consistency | 3.0.0 | ✓ | 𐄂 | ✓ | Publisher | Contains deprecated functions, therefore Drush 10.x is incompatible. |
acquia:contenthub-audit-subscriber | Creates a manifest file of entities to import and delete | 3.0.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub-enqueue-by-filters | Adds entities to the import queue on a subscriber site based on the associated filters, except the default filter | 3.0.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub:entity-scan:filter | Helper Drush command for debugging | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-export-local-cdf | Generates a CDF document from a manifest file | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-filter-details | Lists the details of a filter | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-filters | Lists the available Cloud filters | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-filters:attach | Attaches a filter to the website | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-filters:detach | Detaches a filter from the website | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-import-local-cdf | Imports entities from a CDF document | 3.0.0 | ✓ | ✓ | ✓ | Subscriber | See arguments |
acquia:contenthub-publisher-upgrade | Publisher upgrade command | 3.0.0 | ✓ | ✓ | ✓ | Publisher | Note: This command is deprecated. Do not run as a standalone command |
acquia:contenthub-subscriber-upgrade | Subscriber upgrade command | 3.0.0 | ✓ | ✓ | ✓ | Subscriber | Note: This command is deprecated. Do not run as a standalone command |
acquia:contenthub-fix-config-entities-with-null-uuids | Assigns randomly generated UUIDs to configuration entities with NULL UUIDs | 3.0.0 | ✓ | ✓ | ✓ | - | Experimental: Use with caution |
acquia:contenthub-remote | Prints the CDF from a remote source (Content Hub) | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub:remote-settings | Retrieves subscription settings stored in Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | N/A |
acquia:contenthub-webhooks | Perform a webhook management operation | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-webhook-interests-purge | Performs a webhook interest list purge operation for the current site | 3.0.0 | ✓ | ✓ | ✓ | Subscriber | |
acquia:contenthub-connect-site | Connects a site with Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | N/A |
acquia:contenthub-delete | Deletes a single entity from the Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-disconnect-site | Disconnects a site with Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | N/A |
acquia:contenthub-list | List entities from the Content Hub using the listEntities() method | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-list-queue-items | Prints the content of the import/export queue | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-local | Prints the CDF from a local source (Drupal website) | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | From version 3.3.x onwards, the entity-type argument is optional when the entity UUID is passed |
acquia:contenthub-purge | Purges all entities from Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | Use with caution: This command can remove content from Content Hub. |
acquia:contenthub-regenerate-secret | Regenerates the Shared Secret used for webhook verification | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | N/A |
acquia:contenthub-restore | Restores the backup taken by a previous execution of the purge command | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | Use with caution: This command can remove content from Content Hub. |
acquia:contenthub-update-secret | Updates the Shared Secret used for webhook verification | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | N/A |
acquia:contenthub-audit-entity | Audits an entity for differences with the existing CDF in Content Hub | 3.0.0 | ✓ | ✓ | ✓ | Publisher | See arguments |
acquia:contenthub-settings | Gets Content Hub settings from the different providers and determines the active configuration | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
acquia:contenthub-re-queue | Re-queues entities on publisher or subscriber site | 3.0.0 | ✓ | ✓ | ✓ | Publisher, Subscriber | See arguments |
Troubleshooting Drush commands
If you have enabled Content Hub, but Drush commands fail with the message Command [command_name] needs the following extension(s) enabled to run: acquia_contenthub
, execute the following command to try to resolve the issue:
drush en acquia_contenthub -y drush cr
If Drush commands for Content Hub continue to fail, create a Support ticket.
Command details
Re-originates entities in Content Hub from one source to another. This deletes the original sources after recreation if they did not exist initially, unless the --no-origin-delete
option is used.
Alias | Arguments |
---|---|
ach-reoriginate |
|
Initiates a re-indexing operation in Content Hub. This takes some time depending on the number of entities involved.
Alias | Arguments |
---|---|
ach-reindex | N/A |
acquia:contenthub:entity-scan:orphaned
Scans Content Hub for orphaned entities and displays the ones that are not associated with any registered client.
Alias | Arguments |
---|---|
ach-eso |
|
acquia:contenthub-update-client-metadata
Updates the client metadata in the Content Hub service.
Alias | Arguments |
---|---|
ach-ucm | N/A |
acquia:contenthub-dashboard-allowed-origins
Retrieves the publisher-registered webhooks and stores them within the Drupal configuration.
Alias | Arguments |
---|---|
| N/A |
Synchronizes the interests list of a webhook with the entity tracking tables.
Alias | Arguments |
---|---|
ach-wi-sync (Content Hub 3.x and later) | N/A |
acquia:contenthub-webhook-interests-delete
Deletes interests from a webhook.
Alias | Arguments |
---|---|
ach-wi-del (Content Hub 3.x and later) |
|
acquia:contenthub-webhook-interests-add
Adds interests to a webhook.
Alias | Arguments |
---|---|
ach-wi-add (Content Hub 3.x and later) |
|
acquia:contenthub:client-delete
Deletes clients using names or UUIDs.
Alias | Arguments |
---|---|
ach-cd (Content Hub 3.7.0 and later) |
|
acquia:contenthub:client-update
Updates the Content Hub details.
Alias | Arguments |
---|---|
ach-cu (Content Hub 3.4.0 and later) |
|
acquia:contenthub-webhook-interests-list
Displays the list of interest for the registered webhook.
Alias | Arguments |
---|---|
ach-wi-list (Content Hub 3.3.x and later) |
|
acquia:contenthub-webhooks-list
Displays the list of registered webhooks.
Alias | Arguments |
---|---|
ach-wh-list , acquia-contenthub-webhooks-list (Content Hub 3.5.x and later) |
|
acquia:contenthub-import-queue-run
Runs the Content Hub subscriber import queue.
Alias | Arguments |
---|---|
ach-import (Content Hub 3.3.x and later) |
|
acquia:contenthub-export-queue-run
Runs the Content Hub publisher export queue.
Alias | Arguments |
---|---|
ach-export (Content Hub 3.3.x and later) |
|
acquia:contenthub-audit-publisher
Checks the published entities and compares them with what exists in the Content Hub publisher to ensure consistency
Alias | Arguments |
---|---|
ach-audit-publisher , ach-ap | This command takes the following argument:
You can pass an array of options to process the data:
|
acquia:contenthub-audit-subscriber
Creates a manifest file of entities to import and delete by checking the filter configuration and verifying which entities from Content Hub matches those filters
Alias | Arguments |
---|---|
ach-audit-subscriber , ach-as | This command takes the following arguments:
You can pass an array of options to process the data:
Note This command only gathers information about changes you can make to entities on your website. |
acquia:contenthub-enqueue-by-filters
Adds entities to the import queue on a subscriber site based on the associated filters, except the default filter.
Alias | Arguments |
---|---|
ach-enqueue-by-filters , ach-enfi |
|
acquia:contenthub:entity-scan:filter
Takes an entity UUID and compares it against the existing Cloud Filters, returning a list of filters and sites that the entity matches.
Run --help
to review the help information of the command.
Option to --rebuild-cache
to initiate a depcalc cache rebuild using the tracking table before running the scan. This may take a few minutes to complete.
Alias | Arguments |
---|---|
ach-es-f , ach-esf |
|
acquia:contenthub-export-local-cdf
Generates a CDF document from a manifest file and requires the location of a YAML $manifest
Alias | Arguments |
---|---|
ach-elc |
|
acquia:contenthub-filter-details
Lists the details of a filter.
Alias | Arguments |
---|---|
ach-cfds | This command takes the following argument:
|
acquia:contenthub-filters
Lists the available Cloud filters.
Alias | Arguments |
---|---|
ach-cf | You can pass an array of options to control the output:
|
acquia:contenthub-filters:attach
Attaches a filter to a website.
Alias | Arguments |
---|---|
ach-cfa |
|
acquia:contenthub-filters:detach
Detaches a filter from a website.
Alias | Arguments |
---|---|
ach-cfd |
|
acquia:contenthub-import-local-cdf
Imports entities from a CDF document
Alias | Arguments |
---|---|
ach-ilc |
|
acquia:contenthub-publisher-upgrade
Publisher upgrade command
Alias | Arguments |
---|---|
ach-publisher-upgrade , ach-puup | N/A |
acquia:contenthub-subscriber-upgrade
Subscriber upgrade command
Alias | Arguments |
---|---|
ach-subscriber-upgrade , ach-suup | N/A |
acquia:contenthub-fix-config-entities-with-null-uuids
Assigns randomly generated UUIDs
to configuration entities with NULL
UUIDs
(Experimental: Use with caution)
Alias | Arguments |
---|---|
ach-fix-null-uuids | N/A |
acquia:contenthub-remote
Prints the CDF from a remote source (Content Hub)
Alias | Arguments |
---|---|
ach-re | uuid : The UUID of the entity |
acquia:contenthub:remote-settings
Retrieves the account details from Content Hub and presents it in an easily readable, formatted table. Information includes the subscription ID, registered webhooks, registered clients, and webhook filter assignments.
Alias | Arguments |
---|---|
ach-rs | N/A |
acquia:contenthub-webhooks
Performs a webhook management operation
Alias | Arguments |
---|---|
ach-wh |
|
acquia-contenthub-webhook-interests-purge
Deletes the current webhook and reassigns all existing filters of the current webhook to the newly created webhook. Webhook uuid changes so it must be updated in the configuration. If the configuration is saved in the database, no further action is needed. Otherwise, update the webhook in settings.php or environment variables depending on how the configuration is managed. This deletes everything from the import tracking table and the import queue.
Alias | Arguments |
---|---|
ach-wi-purge | N/A |
acquia:contenthub-connect-site
Connects client to Content Hub
Alias | Arguments |
---|---|
ach-connect | N/A |
acquia:contenthub-delete
Deletes a single entity from Content Hub
Alias | Arguments |
---|---|
ach-del |
|
acquia:contenthub-disconnect-site
Disconnect the client from Content Hub
Alias | Arguments |
---|---|
ach-disconnect | N/A |
acquia:contenthub-list
List content entities that exist in Content Hub
Alias | Arguments |
---|---|
ach-list | You can pass an array of options to control the output:
|
acquia:contenthub-list-queue-items
On publisher, the command prints the content of the acquia_contenthub_publish_export
queue. On subscriber, the command prints the acquia_contenthub_subscriber_import
queue. If the site has dual configuration, import/export value must pass the queue
option. By default, the queue option will have an export
value.
Alias | Arguments |
---|---|
ach-lqi | You can pass an array of options to control the output:
|
acquia:contenthub-local
Prints an entity (in CDF format) from a local source (a Drupal website)
Alias | Arguments |
---|---|
ach-lo |
|
acquia:contenthub-purge
(Developer only): Deletes all entities from Content Hub
Alias | Arguments |
---|---|
ach-purge |
|
When this command is run, a message like the following displays:
You are about to DROP all tables in your 'MY-WEBSITE' database. Do
you want to continue? (y/n):
You must confirm before Content Hub will purge the contents.
acquia:contenthub-regenerate-secret
Regenerates the shared secret used for webhook verification
Alias | Arguments |
---|---|
ach-regsec | N/A |
acquia:contenthub-restore
(Developer only): Restores the backup taken by a previous execution of the purge
command
Alias | Arguments |
---|---|
ach-restore |
|
acquia:contenthub-update-secret
Updates the shared secret used for webhook verification
Alias | Arguments |
---|---|
ach-upsec | N/A |
acquia:contenthub-audit-entity
Audits an entity for differences with the existing CDF in Content Hub. It is a publisher command, which is only available if the site has the acquia_contenthub_publisher
module enabled. It lists the entity and all its dependencies, and compares that data with the one stored remotely in Content Hub. It provides the option to republish that entity and all its dependencies if there are differences.
Alias | Arguments |
---|---|
ach-audit-entity, ach-ae | This command takes the following arguments:
|
acquia:contenthub-settings
Gets Content Hub settings from the different providers and determines the active configuration with any override information.
Alias | Arguments |
---|---|
ach-chs | This command takes the following arguments:
|
acquia:contenthub-re-queue
Re-queues entities on publisher or subscriber. The command expects at least one option to be provided. Also, it does not run the export/import queues.
Alias | Arguments |
---|---|
ach-rq | This command takes the following argument:
|