Skip to content

Commit 00b496e

Browse files
Add syntax highlighting
1 parent 1f31728 commit 00b496e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Quick links: [Using](#using) | [Installing](#installing) | [Support](#
2626

2727
WP-CLI's goal is to provide a command-line interface for any action you might want to perform in the WordPress admin. For instance, `wp plugin install --activate` ([doc](https://wp-cli.org/commands/plugin/install/)) lets you install and activate a WordPress plugin:
2828

29-
```
29+
```bash
3030
$ wp plugin install rest-api --activate
3131
Installing WordPress REST API (Version 2) (2.0-beta13)
3232
Downloading install package from https://downloads.wordpress.org/plugin/rest-api.2.0-beta13.zip...
@@ -39,7 +39,7 @@ Success: Plugin 'rest-api' activated.
3939

4040
WP-CLI also includes commands for many things you can't do in the WordPress admin. For example, `wp transient delete-all` ([doc](https://wp-cli.org/commands/transient/delete-all/)) lets you delete one or all transients:
4141

42-
```
42+
```bash
4343
$ wp transient delete-all
4444
Success: 34 transients deleted from the database.
4545
```
@@ -60,26 +60,26 @@ Before installing WP-CLI, please make sure your environment meets the minimum re
6060

6161
Once you've verified requirements, download the [wp-cli.phar](https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar) file using `wget` or `curl`:
6262

63-
```
63+
```bash
6464
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
6565
```
6666

6767
Next, check if it is working:
6868

69-
```
69+
```bash
7070
$ php wp-cli.phar --info
7171
```
7272

7373
To use WP-CLI from the command line by typing `wp`, make the file executable and move it to somewhere in your PATH. For example:
7474

75-
```
75+
```bash
7676
$ chmod +x wp-cli.phar
7777
$ sudo mv wp-cli.phar /usr/local/bin/wp
7878
```
7979

8080
If WP-CLI was installed successfully, you should see something like this when you run `wp --info`:
8181

82-
```
82+
```bash
8383
$ wp --info
8484
PHP binary: /usr/bin/php5
8585
PHP version: 5.5.9-1ubuntu4.14
@@ -101,15 +101,15 @@ Want to live life on the edge? Run `wp cli update --nightly` to use the latest n
101101

102102
WP-CLI also comes with a tab completion script for Bash and ZSH. Just download [wp-completion.bash](https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash) and source it from `~/.bash_profile`:
103103

104-
```
104+
```bash
105105
source /FULL/PATH/TO/wp-completion.bash
106106
```
107107

108108
Don't forget to run `source ~/.bash_profile` afterwards.
109109

110110
If using zsh for your shell, you may need to load and start `bashcompinit` before sourcing. Put the following in your `.zshrc`:
111111

112-
```
112+
```bash
113113
autoload bashcompinit
114114
bashcompinit
115115
source /FULL/PATH/TO/wp-completion.bash
@@ -136,7 +136,7 @@ A **command** is an atomic unit of WP-CLI functionality. `wp plugin install` ([d
136136

137137
WP-CLI supports registering any callable class, function, or closure as a command. It reads usage details from the callback's PHPdoc. `WP_CLI::add_command()` ([doc](https://wp-cli.org/docs/internal-api/wp-cli-add-command/)) is used for both internal and third-party command registration.
138138

139-
```
139+
```php
140140
/**
141141
* Delete an option from the database.
142142
*

0 commit comments

Comments
 (0)