WordPress Help

Official documentation, learning resources, and contributor guides collected from WordPress.org.

  • WP_CLI::colorize()

    Colorize a string for output. Usage WP_CLI::colorize( $string ) $string (string) String to colorize for output, with color tokens. @return (string) string. Notes Yes, you can change the color of command line text too. For instance, here’s how WP_CLI::success() colorizes “Success: ” WP_CLI::colorize( “%GSuccess:%n ” ) Uses \cli\Colors::colorize() to transform color tokens to display settings.…

    Read guide

  • WP_CLI::add_wp_hook()

    Add a callback to a WordPress action or filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such…

    Read guide

  • WP_CLI::add_hook()

    Schedule a callback to be executed at a certain point. Usage WP_CLI::add_hook( $when, $callback ) $when (string) Identifier for the hook. $callback (callable) Callback to execute when hook is called. @return (void) Notes HooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions…

    Read guide

  • WP_CLI::add_command()

    Register a command to WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/. Usage WP_CLI::add_command( $name, $callable, $args = [] ) $name (string) Name for the command (e.g. “post list” or “site empty”). $callable (callable|object|string|string[]) Command implementation as…

    Read guide

  • Running Commands Remotely

    Using an SSHSSH Secure SHell – a protocol for securely connecting to a remote system in addition to or in place of a password. connection WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ accepts an –ssh=[<scheme>:][<user>@]<host>[:<port>][<path>] global…

    Read guide

  • Release Checklist

    There are two different release checklists available from within the wp-cli/wp-cli repository: Generate a 🚀 Regular Release Checklist – applies to major (2.x.x) and minor (x.1.x) releases. Generate a 🔧 Patch Release Checklist – applies to patch (x.x.1) releases only. As a first step for initiating a release process, the corresponding checklist should be generated…

    Read guide

  • Repository Management

    Package Names Package names for the official wp-cli GitHubGitHub GitHub 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…

    Read guide

  • Roadmap

    WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ is released every 3-4 months, typically around the betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta…

    Read guide

  • Sharing WP-CLI Packages

    By default, WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ places installed packages in ~/.wp-cli/packages/, a hidden subdirectory for the user’s home directory. Because the home directory is different for each user, this naturally means each system…

    Read guide

  • Troubleshooting Guide

    Before you start to report a new issue on the GitHubGitHub GitHub 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…

    Read guide