|
| 1 | +wp-cli/extension-command |
| 2 | +======================== |
| 3 | + |
| 4 | +Manage WordPress plugins and themes. |
| 5 | + |
| 6 | +[](https://travis-ci.org/wp-cli/extension-command) |
| 7 | + |
| 8 | +Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) |
| 9 | + |
| 10 | +## Using |
| 11 | + |
| 12 | +This package implements the following commands: |
| 13 | + |
| 14 | +### wp plugin |
| 15 | + |
| 16 | +Manage plugins. |
| 17 | + |
| 18 | +~~~ |
| 19 | +wp plugin |
| 20 | +~~~ |
| 21 | + |
| 22 | +**EXAMPLES** |
| 23 | + |
| 24 | + # Activate plugin |
| 25 | + $ wp plugin activate hello-dolly |
| 26 | + Plugin 'hello-dolly' activated. |
| 27 | + Success: Activated 1 of 1 plugins. |
| 28 | + |
| 29 | + # Deactivate plugin |
| 30 | + $ wp plugin deactivate hello-dolly |
| 31 | + Plugin 'hello-dolly' deactivated. |
| 32 | + Success: Deactivated 1 of 1 plugins. |
| 33 | + |
| 34 | + # Delete plugin |
| 35 | + $ wp plugin delete hello-dolly |
| 36 | + Deleted 'hello-dolly' plugin. |
| 37 | + Success: Deleted 1 of 1 plugins. |
| 38 | + |
| 39 | + # Install the latest version from wordpress.org and activate |
| 40 | + $ wp plugin install bbpress --activate |
| 41 | + Installing bbPress (2.5.9) |
| 42 | + Downloading install package from https://downloads.wordpress.org/plugin/bbpress.2.5.9.zip... |
| 43 | + Using cached file '/home/vagrant/.wp-cli/cache/plugin/bbpress-2.5.9.zip'... |
| 44 | + Unpacking the package... |
| 45 | + Installing the plugin... |
| 46 | + Plugin installed successfully. |
| 47 | + Activating 'bbpress'... |
| 48 | + Plugin 'bbpress' activated. |
| 49 | + Success: Installed 1 of 1 plugins. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +### wp theme |
| 54 | + |
| 55 | +Manage themes. |
| 56 | + |
| 57 | +~~~ |
| 58 | +wp theme |
| 59 | +~~~ |
| 60 | + |
| 61 | +**EXAMPLES** |
| 62 | + |
| 63 | + # Install the latest version of a theme from wordpress.org and activate |
| 64 | + $ wp theme install twentysixteen --activate |
| 65 | + Installing Twenty Sixteen (1.2) |
| 66 | + Downloading install package from http://downloads.wordpress.org/theme/twentysixteen.1.2.zip... |
| 67 | + Unpacking the package... |
| 68 | + Installing the theme... |
| 69 | + Theme installed successfully. |
| 70 | + Activating 'twentysixteen'... |
| 71 | + Success: Switched to 'Twenty Sixteen' theme. |
| 72 | + |
| 73 | + # Get details of an installed theme |
| 74 | + $ wp theme get twentysixteen --fields=name,title,version |
| 75 | + +---------+----------------+ |
| 76 | + | Field | Value | |
| 77 | + +---------+----------------+ |
| 78 | + | name | Twenty Sixteen | |
| 79 | + | title | Twenty Sixteen | |
| 80 | + | version | 1.2 | |
| 81 | + +---------+----------------+ |
| 82 | + |
| 83 | + # Get status of theme |
| 84 | + $ wp theme status twentysixteen |
| 85 | + Theme twentysixteen details: |
| 86 | + Name: Twenty Sixteen |
| 87 | + Status: Active |
| 88 | + Version: 1.2 |
| 89 | + Author: the WordPress team |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | +### wp theme mod |
| 94 | + |
| 95 | +Manage theme mods. |
| 96 | + |
| 97 | +~~~ |
| 98 | +wp theme mod |
| 99 | +~~~ |
| 100 | + |
| 101 | +**EXAMPLES** |
| 102 | + |
| 103 | + # Set the 'background_color' theme mod to '000000'. |
| 104 | + $ wp theme mod set background_color 000000 |
| 105 | + Success: Theme mod background_color set to 000000 |
| 106 | + |
| 107 | + # Get single theme mod in JSON format. |
| 108 | + $ wp theme mod get background_color --format=json |
| 109 | + [{"key":"background_color","value":"dd3333"}] |
| 110 | + |
| 111 | + # Remove all theme mods. |
| 112 | + $ wp theme mod remove --all |
| 113 | + Success: Theme mods removed. |
| 114 | + |
| 115 | +## Installing |
| 116 | + |
| 117 | +Installing this package requires WP-CLI v0.23.0 or greater. Update to the latest stable release with `wp cli update`. |
| 118 | + |
| 119 | +Once you've done so, you can install this package with `wp package install wp-cli/extension-command`. |
| 120 | + |
| 121 | +## Contributing |
| 122 | + |
| 123 | +We appreciate you taking the initiative to contribute to this project. |
| 124 | + |
| 125 | +Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation. |
| 126 | + |
| 127 | +### Reporting a bug |
| 128 | + |
| 129 | +Think you’ve found a bug? We’d love for you to help us get it fixed. |
| 130 | + |
| 131 | +Before you create a new issue, you should [search existing issues](https://github.com/wp-cli/extension-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version. |
| 132 | + |
| 133 | +Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/extension-command/issues/new) with the following: |
| 134 | + |
| 135 | +1. What you were doing (e.g. "When I run `wp post list`"). |
| 136 | +2. What you saw (e.g. "I see a fatal about a class being undefined."). |
| 137 | +3. What you expected to see (e.g. "I expected to see the list of posts.") |
| 138 | + |
| 139 | +Include as much detail as you can, and clear steps to reproduce if possible. |
| 140 | + |
| 141 | +### Creating a pull request |
| 142 | + |
| 143 | +Want to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/extension-command/issues/new) to discuss whether the feature is a good fit for the project. |
| 144 | + |
| 145 | +Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience: |
| 146 | + |
| 147 | +1. Create a feature branch for each contribution. |
| 148 | +2. Submit your pull request early for feedback. |
| 149 | +3. Include functional tests with your changes. [Read the WP-CLI documentation](https://wp-cli.org/docs/pull-requests/#functional-tests) for an introduction. |
| 150 | +4. Follow the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/). |
| 151 | + |
| 152 | + |
| 153 | +*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.* |
0 commit comments