Como desactivar temas y Plugins mediante WP-Cli

Cuando necesites desactivar un plug in o tema desde wp-cli puedes usar los siguientes comandos:

 wp help plugin --allow-root

wp plugin <command>

SYNOPSIS

  wp plugin <command>

SUBCOMMANDS

  activate              Activates one or more plugins.

  deactivate            Deactivates one or more plugins.

  delete                Deletes plugin files without deactivating or uninstalling.

  get                   Gets details about an installed plugin.

  install               Installs one or more plugins.

  is-active             Checks if a given plugin is active.

  is-installed          Checks if a given plugin is installed.

  list                  Gets a list of plugins.

  path                  Gets the path to a plugin or to the plugin directory.

  search                Searches the WordPress.org plugin directory.

  status                Reveals the status of one or all plugins.

  toggle                Toggles a plugin’s activation state.

  uninstall             Uninstalls one or more plugins.

  update                Updates one or more plugins.

  verify-checksums      Verifies plugin files against WordPress.org’s checksums.

wp theme <command>

  activate          Activates a theme.

  delete            Deletes one or more themes.

  disable           Disables a theme on a WordPress multisite install.

  enable            Enables a theme on a WordPress multisite install.

  get               Gets details about a theme.

  install           Installs one or more themes.

  is-active         Checks if a given theme is active.

  is-installed      Checks if a given theme is installed.

  list              Gets a list of themes.

  mod               Sets, gets, and removes theme mods.

  path              Gets the path to a theme or to the theme directory.

  search            Searches the WordPress.org theme directory.

  status            Reveals the status of one or all themes.

  update            Updates one or more themes.

También puedes usar

wp plugin deactivate --all

Lo que hice

root@Reevolutiva:/var/www/html/wp-content/themes# wp theme disable buddyboss-theme --allow-root
Success: Disabled the 'BuddyBoss Theme' theme.
root@Reevolutiva:/var/www/html/wp-content/themes# wp theme activate twentytwentyone --allow-root
Success: Switched to 'Twenty Twenty-One' theme.
root@Reevolutiva:/var/www/html/wp-content/themes# wp theme disable twentytwentyone --allow-root
Success: Disabled the 'Twenty Twenty-One' theme.
root@Reevolutiva:/var/www/html/wp-content/themes# wp theme activate buddyboss-theme --allow-root
Success: Switched to 'BuddyBoss Theme' theme.
root@Reevolutiva:/var/www/html/wp-content/themes# wp theme activate buddyboss-theme --allow-root

Enlaces

Documentos

¿Conversemos?

Tenemos una solución para cada desafío.
Cuéntanos tus necesidades y objetivos en una reunión con nuestros consultores.

Ingresa tus datos de contacto