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
<ahref="https://github.com/wp-cli/wp-cli/zipball/master" class="btn">Download as .zip</a>
23
+
<ahref="https://github.com/wp-cli/wp-cli/tarball/master" class="btn">Download as .tar.gz</a>
24
+
<ahref="https://github.com/wp-cli/wp-cli" class="btn btn-github"><spanclass="icon"></span>View on GitHub</a>
25
+
</section>
26
+
</div>
27
+
</header>
28
+
29
+
<divclass="container">
30
+
<sectionid="main_content">
31
+
<h2>What is wp-cli?</h2>
32
+
33
+
<p>wp-cli is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs, update posts and much more.</p>
34
+
35
+
<p>Visit the <ahref="https://github.com/wp-cli/wp-cli/wiki">wiki</a> for more information.</p>
<p>So this tells us which commands are installed: eg. google-sitemap, core, home, ...
92
+
Between brackets you can see their sub commands. </p>
93
+
94
+
<p>Let's for example try to install the hello dolly plugin from wordpress.org:</p>
95
+
96
+
<pre><code>wp plugin install hello-dolly
97
+
</code></pre>
98
+
99
+
<p>Output:</p>
100
+
101
+
<pre><code>Installing Hello Dolly (1.5)
102
+
103
+
Downloading install package from http://downloads.WordPress.org/plugin/hello-dolly.1.5.zip ...
104
+
Unpacking the package ...
105
+
Installing the plugin ...
106
+
107
+
Success: The plugin is successfully installed
108
+
</code></pre>
109
+
110
+
<h2>Multisite</h2>
111
+
112
+
<p>On a multisite installation, you need to pass a --blog parameter, so that WP knows which site it's supposed to be operating on:</p>
113
+
114
+
<pre><code>wp theme status --blog=localhost/wp/test
115
+
</code></pre>
116
+
117
+
<p>If you have a subdomain installation, it would look like this:</p>
118
+
119
+
<pre><code>wp theme status --blog=test.example.com
120
+
</code></pre>
121
+
122
+
<p>If you're usually working on the same site most of the time, you can put the url of that site in a file called 'wp-cli-blog' in your root WP dir:</p>
<p>Then, you can call <code>wp</code> without the --blog parameter again:</p>
128
+
129
+
<pre><code>wp theme status
130
+
</code></pre>
131
+
132
+
<h1>Adding commands</h1>
133
+
134
+
<p>Adding commands to wp-cli is very easy. You can even add them from within your own plugin.
135
+
You can find more information about adding commands in the <ahref="https://github.com/wp-cli/wp-cli/wiki/Commands-Cookbook">Commands Cookbook</a> on our Wiki.</p>
136
+
137
+
<p><strong>Please share the commands you make, issue a pull request to get them included in wp-cli by default.</strong></p>
138
+
139
+
<h1>Changelog</h1>
140
+
141
+
<p><strong>0.6</strong></p>
142
+
143
+
<ul>
144
+
<li>added <code>wp post</code> and <code>wp post-meta</code>
145
+
</li>
146
+
<li>added <code>wp user-meta</code>
147
+
</li>
148
+
<li>added <code>wp blog create</code>
149
+
</li>
150
+
<li>added <code>wp export</code>
151
+
</li>
152
+
<li>added <code>wp transient</code>
153
+
</li>
154
+
<li>added <code>wp db optimize</code> and <code>wp db repair</code>
155
+
</li>
156
+
<li>added <code>wp db create</code>, <code>wp db drop</code> and <code>wp db reset</code>
157
+
</li>
158
+
<li>added <code>wp db import</code>
159
+
</li>
160
+
<li>added <code>wp theme install</code> and <code>wp theme update</code>
161
+
</li>
162
+
<li>added <code>wp core install_network</code>
163
+
</li>
164
+
<li>added <code>wp core update_db</code>
165
+
</li>
166
+
<li>added <code>--json</code> option to several subcommands</li>
167
+
<li>added <code>--network</code> option to <code>wp plugin activate</code>
168
+
</li>
169
+
<li>added <code>--require</code> global parameter</li>
170
+
<li>fixed <code>wp plugin update</code>
171
+
</li>
172
+
<li>fixed "out of memory" error</li>
173
+
<li>misc bugfixes and optimizations</li>
174
+
<li>man pages (not in PEAR package)</li>
175
+
</ul><p><strong>0.5</strong></p>
176
+
177
+
<ul>
178
+
<li>added <code>wp user</code>
179
+
</li>
180
+
<li>added <code>wp core download</code>
181
+
</li>
182
+
<li>added <code>wp core config</code>
183
+
</li>
184
+
<li>added <code>wp plugin update --all</code>
185
+
</li>
186
+
<li>added <code>wp theme update</code>
187
+
</li>
188
+
<li>added <code>wp db import</code>
189
+
</li>
190
+
<li>added <code>--url</code><code>--path</code> and <code>--user</code> global parameters</li>
191
+
<li>various bugfixes</li>
192
+
</ul><p><strong>0.4</strong></p>
193
+
194
+
<ul>
195
+
<li>added <code>wp eval</code> and <code>wp eval-file</code>
196
+
</li>
197
+
<li>added <code>wp export</code>
198
+
</li>
199
+
<li>added <code>wp core install</code>
200
+
</li>
201
+
<li>fixed <code>wp core update</code>
202
+
</li>
203
+
<li>added <code>--dev</code> flag to <code>wp plugin install</code>
204
+
</li>
205
+
<li>added <code>wp plugin uninstall</code>
206
+
</li>
207
+
<li>fixed <code>wp plugin install</code> and <code>wp plugin update</code>
208
+
</li>
209
+
</ul><p><strong>0.3</strong></p>
210
+
211
+
<ul>
212
+
<li>added <code>wp sql</code>
213
+
</li>
214
+
<li>improved <code>wp option</code>
215
+
</li>
216
+
<li>pear installer</li>
217
+
</ul><p><strong>0.2</strong></p>
218
+
219
+
<ul>
220
+
<li>added multisite support</li>
221
+
<li>improved <code>wp plugin</code> and <code>wp theme</code>
0 commit comments