Welcome to the official home of the WordPress Documentation Team.
This team is responsible for coordinating all documentation initiatives around WordPress, including the handbooks and other general wordsmithing across the WordPress project.
Want to get involved?
Start here to find out more about what we do and how to contribute:
Documentation Issue Tracker on GitHub: Submit any Documentation Team-related issues on GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/
Weekly meetings
Join our discussions of documentation issues here on the blog and on Slack.
Highlight: Follow proper command-line syntax and formatting.
This page explains how to format commands and their arguments in documentation. For more information about other code-related documentation, see Code in text, Placeholders, and Code examples.
When you have to show multiple lines of command-line input, initiate each line with the dollar ($) command prompt symbol.
Don’t show the current directory path before the prompt, even if part of the instruction includes creating or changing directories. This is because the directory structure might be different for the user. However, if the general context of the command-line interface changes—such as from the local machine to a remote machine—then add an additional prompt indicator for the new context.
Examples
Recommended:
<br />
$ wp theme activate twentytwentyone<br />
The output is the following:
<br />
Success: Switched to 'Twenty Twenty-One' theme.<br />
For single-line commands, the command prompt, that is the dollar symbol ($) is optional. However, if you have to show both multi-line and single-line commands, use the command prompt symbol for overall consistency.
Use separate code blocks for command-line instructions that include both input and output lines.
Example
Recommended:
<br />
$ wp cap list 'editor' | xargs wp cap add 'author'<br />
The output is the following:
<br />
Success: Added 24 capabilities to 'author' role.<br />
When writing arguments that are optional, enclose the arguments in square brackets. If there is more than one optional argument, enclose each item in its individual set of square brackets.
When writing commands where the use has to choose one item, enclose the items in angle brackets (<>; also known as inequality signs). Sometimes the mutually exclusive choices are also enclosed in braces (also known as curly braces). Use vertical bars (also knows as pipes) to separate the items. You can have more than two mutually exclusive items that are separated from each other by pipes.
In this example, install is required, and <plugin|zip|url> is the accepted positional argument. In fact, wp plugin install accepts the same positional argument (the slug, ZIP, or URL of a plugin to install). The plugin, zip, and url choices are mutually exclusive, but one of the argument must be specified.
You don’t have to show an output for every command. Only add the output if it is useful; for example, if the user needs to copy a value or needs to verify a value from the output.
If you do show have to show an output, use an introductory phrase to separate the command from the output.
<br />
$ wp server –host=localhost.localdomain –port=80<br />
The output is similar to the following:
<br />
PHP 5.6.9 Development Server started at Fri Jan 22 11:32:56 2021<br />
Listening on http://localhost1.localdomain1:80<br />
Document root is /<br />
Press Ctrl-C to quit.<br />
For more information about explaining placeholders in output, see Placeholders in output.