You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/DB_Command.php
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,9 @@ public function query( $args, $assoc_args ) {
264
264
*
265
265
* [--tables=<tables>]
266
266
* : The comma separated list of specific tables to export. Excluding this parameter will export all tables in the database.
267
+
*
268
+
* [--exclude_tables=<tables>]
269
+
* : The comma separated list of specific tables that should be skipped from exporting. Excluding this parameter will export all tables in the database.
267
270
*
268
271
* [--porcelain]
269
272
* : Output filename for the exported database.
@@ -285,6 +288,18 @@ public function query( $args, $assoc_args ) {
285
288
* # Export all tables matching prefix
286
289
* $ wp db export --tables=$(wp db tables --all-tables-with-prefix --format=csv)
287
290
* Success: Exported to 'wordpress_dbase.sql'.
291
+
*
292
+
* # Skip certain tables from the exported database
293
+
* $ wp db export --exclude_tables=wp_options,wp_users
294
+
* Success: Exported to 'wordpress_dbase.sql'.
295
+
*
296
+
* # Skip all tables matching a wildcard from the exported database
297
+
* $ wp db export --exclude_tables=$(wp db tables 'wp_user*' --format=csv)
298
+
* Success: Exported to 'wordpress_dbase.sql'.
299
+
*
300
+
* # Skip all tables matching prefix from the exported database
301
+
* $ wp db export --exclude_tables=$(wp db tables --all-tables-with-prefix --format=csv)
302
+
* Success: Exported to 'wordpress_dbase.sql'.
288
303
*
289
304
* @alias dump
290
305
*/
@@ -320,6 +335,17 @@ public function export( $args, $assoc_args ) {
0 commit comments