Wp db clean (WP-CLI)

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 5 dec 2023 om 09:19 (Nieuwe pagina aangemaakt met 'Ah, this deletes tables from your database. Are you sure you want to do that??? <pre> $ wp help db clean NAME wp db clean DESCRIPTION Removes all tables wi...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Naar navigatie springen Naar zoeken springen

Ah, this deletes tables from your database. Are you sure you want to do that???

$ wp help db clean

NAME

  wp db clean

DESCRIPTION

  Removes all tables with `$table_prefix` from the database.

SYNOPSIS

  wp db clean [--dbuser=<value>] [--dbpass=<value>] [--yes]

  Runs `DROP_TABLE` for each table that has a `$table_prefix` as specified
  in wp-config.php.

OPTIONS

  [--dbuser=<value>]
    Username to pass to mysql. Defaults to DB_USER.

  [--dbpass=<value>]
    Password to pass to mysql. Defaults to DB_PASSWORD.

  [--yes]
    Answer yes to the confirmation message.

EXAMPLES

    # Delete all tables that match the current site prefix.
    $ wp db clean --yes
    Success: Tables dropped.