Les commandes CLI :


Lorsque WP_CLI est installé, les commandes suivantes sont disponibles.

Export

NAME

  wp wd export

DESCRIPTION

  Exports items to the file system.

SYNOPSIS

  wp wd export [--item-full-uuids=<item-full-uuids>] [--only-modified] [--since=<since>]

ALIAS

  ex

OPTIONS

  [--item-full-uuids=<item-full-uuids>]

    Restricts the export to the specified items.

    It can be a comma-separated list of item full UUIDs.

    If not specified, all candidate items will be selected for export.

  [--only-modified]

    Set this to only add, as candidates for export, items which have last_modification_date != prod_sync_date.

    This option is ignored and takes "true" as value when --since and --item-full-uuids are neither specified.

  [--since=<since>]

    The date since which items should be exported.

    If not specified, all candidate items will be selected for export.

    It can be a date in any format supported by PHP's DateTime class.

    If the time zone is not specified, the UTC time zone will be used.

    Note: dependencies of the selected items will also be exported.

EXAMPLES

    wp wd ex

    wp wd export

    wp wd export --since="2024-01-01"

    wp wd export --since="2024-01-01T00:00:00" --item-full-uuids="12345678-1234-1234-1234-123456789012"

Import

NAME

  wp wd import

DESCRIPTION

  Imports items from the file system.

SYNOPSIS

  wp wd import <bundle-id> [--force-import] [--item-full-uuids=<item-full-uuids>]

ALIAS

  im

OPTIONS

  <bundle-id>

    The bundle ID to import. This is the name of the directory containing the bundle.

  [--force-import]

    Set this to ignore any conflicting changes and import anyway.

    Use with caution, as this can lead to data loss.

  [--item-full-uuids=<item-full-uuids>]

    Restricts the import to the specified items.

    It can be a comma-separated list of item full UUIDs.

    If not specified, all candidate items will be selected for import.

    Note: dependencies of the selected items will also be imported.

EXAMPLES

    wp wd im 20240102152339363249

    wp wd import 20240102152339363249

    wp wd import 20240102152339363249 --force-import

    wp wd import 20240102152339363249 --item-full-uuids="12345678-1234-1234-1234-123456789012"

 

Reset

NAME

  wp wd resetLastModificationDates

DESCRIPTION

  Resets the last modification dates of the local trackers.

SYNOPSIS

  wp wd resetLastModificationDates 

ALIAS

  reset

  This is usually needed right after a database copy on a development instance,

  to get rid of "Modified" false positives created by the duplication tools.

EXAMPLES

    wp wd reset

    wp wd resetLastModificationDates

 

Debug

Taper la commande :

wp transient set wpdeployer_debug “1” 3600

Pour désactiver :

wp transient set wpdeployer_debug “0” 3600

La valeur 3600 est le temps en secondes pendant laquelle la variable sera active.