wp db export [] [–dbuser=] [–dbpass=] [–=] [–tables=] [–exclude_tables=] [–porcelain]
ALIAS
dump
Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD` database credentials specified in wp-config.php.
OPTIONS
[] The name of the SQL file to export. If ‘-‘, then outputs to STDOUT. If omitted, it will be ‘{dbname}-{Y-m-d}-{random-hash}.sql’.
[–dbuser=] Username to pass to mysqldump. Defaults to DB_USER.
[–dbpass=] Password to pass to mysqldump. Defaults to DB_PASSWORD.
[–=] Extra arguments to pass to mysqldump.
[–tables=] The comma separated list of specific tables to export. Excluding this parameter will export all tables in the database.
[–exclude_tables=] The comma separated list of specific tables that should be skipped from exporting. Excluding this parameter will export all tables in the database.
[–porcelain] Output filename for the exported database.
EXAMPLES
# Export database with drop query included $ wp db export –add-drop-table Success: Exported to ‘wordpress_dbase-db72bb5.sql’.
# Export certain tables $ wp db export –tables=wp_options,wp_users Success: Exported to ‘wordpress_dbase-db72bb5.sql’.
# Export all tables matching a wildcard $ wp db export –tables=$(wp db tables ‘wp_user*’ –format=csv) Success: Exported to ‘wordpress_dbase-db72bb5.sql’.
Administrando usuarios
#
wp user list
# wp user create John john@yourwebsite.com –role=administrator
# wp user update john –display_name=John –user_pass=john123pass
Borra un usuario y reasigna sus posts a otro usuario
# wp user delete john –reassign=bob
Actualiza passwd
# wp user update USERNAME –user_pass=”NEW_PASSWORD”