June 2026 promo! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

how to specify the environment with WP-CLI @ aliases?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25941
    Stephanie
    Guest

    just for better search visibility we are adding this thread… please note that SlickStack customizes WP-CLI to have the following environment flags:

    @dev, @development, @staging, @prod, @production, @both, and @all

    #25942
    Mark
    Guest

    mentioned here:

    Commands

    By default, our WP-CLI implementation will target the production site. However, you can use the environment aliases @dev, @development, @staging, @prod, @production to target a specific SlickStack environment(s) if desired.

    You can also use @both to target both staging and production, and @all to target all three of these environments (note that, you must first enable dev/staging sites in your ss-config).

    #25943
    Olivia
    Guest

    simply add these @ flags to your wp commands to target the desired environment!

    #25944
    Sara
    Guest
    #25946
    Donald
    Guest

    What if you don’t specify the @ environment in SlickStack for wp commands?

    #25979
    Ruth
    Guest

    I have used WP CLI for a while, and never knew you could do this lol

    #25980
    Kyle
    Guest

    What if you don’t specify the @ environment in SlickStack

    SlickStack default is:

    path: /var/www/html
    url: https://@SITE_FULL_DOMAIN

    in the /var/www/meta/wp-cli.yml config file.

    This means the production site will be targeted by default, and for Multisite, the main site will be targeted by default.

    https://github.com/littlebizzy/slickstack/blob/master/modules/wordpress/wp-cli/wp-cli-yml.txt

    #26014
    Kevin
    Guest

    💯

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: how to specify the environment with WP-CLI @ aliases?

Thanks to our generous sponsors for their support!