Skip to content

Support mutliple associative arguments of same name #352

Closed as duplicate

Description

Hi guys, thanks for your awesome command-line tool.

I would like wp db export to exclude the data from certain tables using multiple arguments of the type --ignore-table-data="<database>.<table>". Unfortunately, only the last --ignore-table-data argument passed is included in the final MySQL dump command. For example

$ wp db export \
   --ignore-table-data="project.wp_users" \
   --ignore-table-data="project.wp_usermeta"

becomes

$ mariadb-dump \
   --no-defaults \
   'project' \
   --no-tablespaces --host='<host>' \
   --user='<user>' \
   --default-character-set='utf8mb4' \
   --ignore-table-data='project.wp_usermeta'

Is this by design or a bug?


WordPress: 6.9.7
WP-CLI: 2.11.0
PHP: 8.3

Activity

  1. added
    command:db-export
    status:unconfirmed
    on Oct 9, 2026
  2. transferred this issue fromwp-cli/wp-clion Oct 9, 2026
  3. swissspidy commented on Oct 9, 2026

    @swissspidy
    Member

    Please see discussion at #289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcommand:db-exportstatus:unconfirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions