WP-CLI ist eine Befehlszeile für WordPress, mit der Entwickler verschiedene Aktionen ausführen können – einschliesslich solcher, die im WordPress-Adminbereich nicht verfügbar sind.

Die WP-CLI Konsole kann hier aufgerufen werden:

  1. https://my.barinformatik.ch > Meine Dienste > Webserver > Webadministration Plesk
  2. Reiter "Wordpress" > "WP CLI"

 

Wichtig
WP-CLI ist für erfahrene Entwickler gedacht.
Seien Sie also vorsichtig, damit Ihre Website keinen Schaden nimmt.

Wir empfehlen wenn immer möglich die Benutzeroberfläche des WP Toolkits zu benutzen.

WP-CLI-Befehle, die hier ausgeführt werden, wirken sich direkt auf die WordPress-Website aus und umgehen die Benutzeroberfläche von WP Toolkit.
Um diese Änderungen danach in der WP Toolkit-Benutzeroberfläche zu sehen, klicken Sie oben rechts auf der Website-Karte auf "Aktualisieren" oder warten Sie, bis der Installations-Cache automatisch aktualisiert wird.

 

Befehle

  • cache - Adds, removes, fetches, and flushes the WP Object Cache object.
  • cap - Adds, removes, and lists capabilities of a user role.
  • cli - Reviews current WP-CLI info, checks for updates, or views defined aliases.
  • comment - Creates, updates, deletes, and moderates comments.
  • config - Generates and reads the wp-config.php file.
  • core - Downloads, installs, updates, and manages a WordPress installation.
  • cron - Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.
  • db - Performs basic database operations using credentials stored in wp-config.php.
  • embed - Inspects oEmbed providers, clears embed cache, and more.
  • eval - Executes arbitrary PHP code.
    <php-code> [--skip-wordpress]
  • eval-file - Loads and executes a PHP file.
    <file> [<arg>...] [--skip-wordpress] [--use-include]
  • export - Exports WordPress content to a WXR file.
    [--dir=<dirname>] [--stdout] [--skip_comments] [--max_file_size=<MB>] [--filename_format=<format>] [--include_once=<before_posts>] [--allow_orphan_terms] [--start_date=<date>] [--end_date=<date>] [--post_type=<post-type>] [--post_type__not_in=<post-type>] [--post__in=<pid>] [--with_attachments] [--start_id=<pid>] [--max_num_posts=<num>] [--author=<author>] [--category=<name|id>] [--post_status=<status>]
  • help - Gets help on WP-CLI, or on a specific command.
    [<command>...]
  • i18n - Provides internationalization tools for WordPress projects.
  • import - Imports content from a given WXR file.
    <file>... --authors=<authors> [--skip=<data-type>]
    language - Installs, activates, and manages language packs.
  • media - Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
  • menu - Lists, creates, assigns, and deletes the active theme's navigation menus.
  • network - Perform network-wide operations.
  • option - Retrieves and sets site options, including plugin and WordPress settings.
  • package - Lists, installs, and removes WP-CLI packages.
  • plugin - Manages plugins, including installs, activations, and updates.
  • post - Manages posts, content, and meta.
  • post-type - Retrieves details on the site's registered post types.
  • rewrite - Lists or flushes the site's rewrite rules, updates the permalink structure.
  • role - Manages user roles, including creating new roles and resetting to defaults.
  • scaffold - Generates code for post types, taxonomies, plugins, child themes, etc.
  • search-replace - Searches/replaces strings in the database.
    <old> <new> [<table>...] [--dry-run] [--network] [--all-tables-with-prefix] [--all-tables] [--export[=<file>]] [--export_insert_size=<rows>] [--skip-tables=<tables>] [--skip-columns=<columns>] [--include-columns=<columns>] [--precise] [--recurse-objects] [--verbose] [--regex] [--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>] [--regex-limit=<regex-limit>] [--format=<format>] [--report] [--report-changed-only] [--log[=<file>]] [--before_context=<num>] [--after_context=<num>]
  • server - Launches PHP's built-in web server for a specific WordPress installation.
    [--host=<host>] [--port=<port>] [--docroot=<path>] [--config=<file>]
    shell - Opens an interactive PHP console for running and testing PHP code.
    [--basic]
  • sidebar - Lists registered sidebars.
  • site - Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.
  • super-admin - Lists, adds, or removes super admin users on a multisite installation.
  • taxonomy - Retrieves information about registered taxonomies.
  • term - Manages taxonomy terms and term meta, with create, delete, and list commands.
  • theme - Manages themes, including installs, activations, and updates.
  • transient - Adds, gets, and deletes entries in the WordPress Transient Cache.
  • user - Manages users, along with their roles, capabilities, and meta.
  • widget - Manages widgets, including adding and moving them within sidebars.
Was this answer helpful? 0 Users Found This Useful (0 Votes)