Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -826,17 +826,12 @@ Defaults to all tables registered to the $wpdb database handler.
Displays the database name and size.

~~~
wp db size [--size_format=<format>] [--tables] [--human-readable] [--fields=<fields>] [--format=<format>] [--scope=<scope>] [--network] [--decimals=<decimals>] [--all-tables-with-prefix] [--all-tables] [--order=<order>] [--orderby=<orderby>]
wp db size [--size_format=<format>] [--tables] [--human-readable] [--format=<format>] [--scope=<scope>] [--network] [--decimals=<decimals>] [--all-tables-with-prefix] [--all-tables] [--order=<order>] [--orderby=<orderby>]
~~~

Display the database name and size for `DB_NAME` specified in wp-config.php.
The size defaults to a human-readable number.

The reported size is the sum of the data and the index size. Both can be
displayed separately by adding them to `--fields`. For SQLite, the database
size is the size of the database file, which also includes overhead such as
free pages.

Available size formats include:
* b (bytes)
* kb (kilobytes)
Expand Down Expand Up @@ -881,9 +876,6 @@ Available size formats include:
[--human-readable]
Display database sizes in human readable formats.

[--fields=<fields>]
Get a specific subset of the fields.

[--format=<format>]
Render output in a particular format.
---
Expand All @@ -901,7 +893,7 @@ Available size formats include:
List all the tables in a multisite install.

[--decimals=<decimals>]
Number of digits after decimal point. Defaults to 0, or 2 when using --human-readable.
Number of digits after decimal point. Defaults to 0.

[--all-tables-with-prefix]
List all tables that match the table prefix even if not registered on $wpdb. Overrides --network.
Expand All @@ -927,18 +919,6 @@ Available size formats include:
- size
---

**AVAILABLE FIELDS**

These fields will be displayed by default:

* Name
* Size

These fields are optionally available:

* Data
* Index

**EXAMPLES**

$ wp db size
Expand Down Expand Up @@ -966,13 +946,6 @@ These fields are optionally available:
| wp_commentmeta | 48 KB |
+-----------------------+-------+

$ wp db size --fields=Name,Data,Index,Size --human-readable
+-------------------+---------+--------+---------+
| Name | Data | Index | Size |
+-------------------+---------+--------+---------+
| wordpress_default | 3.43 GB | 2.8 GB | 6.23 GB |
+-------------------+---------+--------+---------+

$ wp db size --size_format=b
5865472

Expand Down