Skip to content

Commit 0b075d4

Browse files
Regenerate README from command docs
1 parent 7532e70 commit 0b075d4

File tree

2 files changed

+41
-13
lines changed

2 files changed

+41
-13
lines changed

README.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,36 @@ Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contr
1111

1212
This package implements the following commands:
1313

14+
### wp db
15+
16+
Performs basic database operations using credentials stored in wp-config.php.
17+
18+
~~~
19+
wp db
20+
~~~
21+
22+
**EXAMPLES**
23+
24+
# Create a new database.
25+
$ wp db create
26+
Success: Database created.
27+
28+
# Drop an existing database.
29+
$ wp db drop --yes
30+
Success: Database dropped.
31+
32+
# Reset the current database.
33+
$ wp db reset --yes
34+
Success: Database reset.
35+
36+
# Execute a SQL query stored in a file.
37+
$ wp db query < debug.sql
38+
39+
40+
1441
### wp db create
1542

16-
Create a new database.
43+
Creates a new database.
1744

1845
~~~
1946
wp db create
@@ -32,7 +59,7 @@ wp-config.php.
3259

3360
### wp db drop
3461

35-
Delete the existing database.
62+
Deletes the existing database.
3663

3764
~~~
3865
wp db drop [--yes]
@@ -56,7 +83,7 @@ wp-config.php.
5683

5784
### wp db reset
5885

59-
Remove all tables from the database.
86+
Removes all tables from the database.
6087

6188
~~~
6289
wp db reset [--yes]
@@ -80,7 +107,7 @@ specified in wp-config.php.
80107

81108
### wp db check
82109

83-
Check the current status of the database.
110+
Checks the current status of the database.
84111

85112
~~~
86113
wp db check
@@ -102,7 +129,7 @@ for more details on the `CHECK TABLE` statement.
102129

103130
### wp db optimize
104131

105-
Optimize the database.
132+
Optimizes the database.
106133

107134
~~~
108135
wp db optimize
@@ -124,7 +151,7 @@ for more details on the `OPTIMIZE TABLE` statement.
124151

125152
### wp db prefix
126153

127-
Display the database table prefix.
154+
Displays the database table prefix.
128155

129156
~~~
130157
wp db prefix
@@ -141,7 +168,7 @@ Display the database table prefix, as defined by the database handler's interpre
141168

142169
### wp db repair
143170

144-
Repair the database.
171+
Repairs the database.
145172

146173
~~~
147174
wp db repair
@@ -163,7 +190,7 @@ more details on the `REPAIR TABLE` statement.
163190

164191
### wp db cli
165192

166-
Open a MySQL console using credentials from wp-config.php
193+
Opens a MySQL console using credentials from wp-config.php
167194

168195
~~~
169196
wp db cli [--database=<database>] [--default-character-set=<character-set>] [--<field>=<value>]
@@ -190,7 +217,7 @@ wp db cli [--database=<database>] [--default-character-set=<character-set>] [--<
190217

191218
### wp db query
192219

193-
Execute a SQL query against the database.
220+
Executes a SQL query against the database.
194221

195222
~~~
196223
wp db query [<sql>] [--<field>=<value>]
@@ -311,7 +338,7 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and
311338

312339
### wp db import
313340

314-
Import a database from a file or from STDIN.
341+
Imports a database from a file or from STDIN.
315342

316343
~~~
317344
wp db import [<file>] [--skip-optimization]
@@ -340,7 +367,7 @@ defined in the SQL.
340367

341368
### wp db search
342369

343-
Find a string in the database.
370+
Finds a string in the database.
344371

345372
~~~
346373
wp db search <search> [<tables>...] [--network] [--all-tables-with-prefix] [--all-tables] [--before_context=<num>] [--after_context=<num>] [--regex] [--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>] [--table_column_once] [--one_line] [--matches_only] [--stats] [--table_column_color=<color_code>] [--id_color=<color_code>] [--match_color=<color_code>]
@@ -468,7 +495,7 @@ They can be concatenated. For instance, the default match color of black on a mu
468495

469496
### wp db tables
470497

471-
List the database tables.
498+
Lists the database tables.
472499

473500
~~~
474501
wp db tables [<table>...] [--scope=<scope>] [--network] [--all-tables-with-prefix] [--all-tables] [--format=<format>]
@@ -524,7 +551,7 @@ Defaults to all tables registered to the $wpdb database handler.
524551

525552
### wp db size
526553

527-
Display the database name and size.
554+
Displays the database name and size.
528555

529556
~~~
530557
wp db size [--size_format] [--tables] [--format] [--scope=<scope>] [--network] [--all-tables-with-prefix] [--all-tables]

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"bundled": true,
3434
"commands": [
35+
"db",
3536
"db create",
3637
"db drop",
3738
"db reset",

0 commit comments

Comments
 (0)