Wp db optimize (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
NAME

  wp db optimize

DESCRIPTION

  Optimizes the database.

SYNOPSIS

  wp db optimize [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]

  Runs `mysqlcheck` utility with `--optimize=true` using `DB_HOST`,
  `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials
  specified in wp-config.php.

  [See docs][1]
  for more details on the `OPTIMIZE TABLE` statement.

  ---
  [1] http://dev.mysql.com/doc/refman/5.7/en/optimize-table.html

OPTIONS

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

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

  [--<field>=<value>]
    Extra arguments to pass to mysqlcheck. [Refer to mysqlcheck docs](https://dev.mysql.com/doc/en/mysqlcheck.html).

  [--defaults]
    Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to
    misconfiguration.

EXAMPLES

    $ wp db optimize
    Success: Database optimized.