Wp (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

wp is het hoofdcommando van de WordPress Command Line Interface - WP-CLI:

  • Als je dit commando (zonder argmenten) geeft terwijl de werkmap geen WP-installatie betreft, krijg je een overzicht van de 'generieke' wp-commando's
  • Als je dit commando (zonder argumenten) geeft terwijl de werkmap een WP-installatie betreft, krijg je tevens plugin-specifieke commando's te zien.

Voorbeeld deel van de output binnen een WP-installatie waar WooCommerce is geïnstalleerd ('wp wc'):

$ wp help

NAME

  wp

DESCRIPTION

  Manage WordPress through the command-line.

SYNOPSIS

  wp <command>

SUBCOMMANDS

  cache               Manage the object cache.
  cap                 Manage user capabilities.
  checksum            Verify WordPress core checksums.
  cli                 Review current WP-CLI info, check for updates, or see
                      defined aliases.
  comment             Manage comments.
  config              Manage the wp-config.php file
  core                Download, install, update and manage a WordPress
                      install.
  cron                Manage WP-Cron events and schedules.
  db                  Perform basic database operations using credentials
                      stored in wp-config.php
  eval                Execute arbitrary PHP code.
  eval-file           Load and execute a PHP file.
  export              Export WordPress content to a WXR file.
  help                Get help on WP-CLI, or on a specific command.
  import              Import content from a WXR file.
  language            
  media               Import new attachments or regenerate existing ones.
  menu                List, create, assign, and delete menus.
  network             
  option              Manage options.
  package             Manage WP-CLI packages.
  plugin              Manage plugins.
  post                Manage posts.
  post-type           Manage post types.
  rewrite             Manage rewrite rules.
  role                Manage user roles.
  scaffold            Generate code for post types, taxonomies, plugins,
                      child themes, etc.
  search-replace      Search/replace strings in the database.
  server              Launch PHP's built-in web server for this specific
                      WordPress installation.
  shell               Interactive PHP console.
  sidebar             Manage sidebars.
  site                Perform site-wide operations.
  super-admin         Manage super admins on WordPress multisite.
  taxonomy            Manage taxonomies.
  term                Manage terms.
  theme               Manage themes.
  transient           Manage transients.
  user                Manage users.
  wc                  
  widget              Manage sidebar widgets.