Wp site (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

wp site creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.

$ wp help site

NAME

  wp site

DESCRIPTION

  Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.

SYNOPSIS

  wp site <command>

SUBCOMMANDS

  activate             Activates one or more sites.
  archive              Archives one or more sites.
  create               Creates a site in a multisite installation.
  deactivate           Deactivates one or more sites.
  delete               Deletes a site in a multisite installation.
  empty                Empties a site of its content (posts, comments, terms, and meta).
  list                 Lists all sites in a multisite installation.
  mature               Sets one or more sites as mature.
  meta                 Adds, updates, deletes, and lists site custom fields.
  option               Adds, updates, deletes, and lists site options in a multisite installation.
  private              Sets one or more sites as private.
  public               Sets one or more sites as public.
  spam                 Marks one or more sites as spam.
  switch-language      Activates a given language.
  unarchive            Unarchives one or more s[[file:20180528-2057.png|thumb|Voorbeeld <code>wp search-replace</code> waarbij ''siteurl'' en ''home'' worden aangepast - Oude situatie]]
[[file:20180528-2058.png|thumb|Voorbeeld <code>wp search-replace</code> waarbij ''siteurl'' en ''home'' worden aangepast - Nieuwe situatie]]
ites.
  unmature             Sets one or more sites as immature.
  unspam               Removes one or more sites from spam.

EXAMPLES

    # Create site
    $ wp site create --slug=example
    Success: Site 3 created: www.example.com/example/

    # Output a simple list of site URLs
    $ wp site list --field=url
    http://www.example.com/
    http://www.example.com/subdir/

    # Delete site
    $ wp site delete 123
    Are you sure you want to delete the 'http://www.example.com/example' site? [y/n] y
    Success: The site at 'http://www.example.com/example' was deleted.

wp site switch-language

Dit is de opvolger van wp language core install. Voorbeeld:

wp site switch-language fr_FR