• Resolved bernardremacle

    (@bernardremacle)


    I am inexperienced with WP-CLI, which I have successfully installed on my Mac; I also used the command

    wp package install wp-cli/admin-command

    I can use the command

    wp admin --path=/Users/bernard/Sites/wordpress

    to open /wp-admin/ in the browser (when I am currently not in my wordpress directory).

    However, the command will always open in my default browser (Safari). Sometimes, I would like to open /wp-admin/ in the Google Chrome browser.

    my questions are:

    • is there an argument I can use with the wp admin command to specify the browser?
    • or, can the browser be specified if I create my own CLI command?
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    (@macmanx)

    There is no way in WordPress or wp-CLI to control which browser opens.

    On a Mac though, I recommend installing https://sindresorhus.com/velja which will take over as the default browser, and then you tell it what things you want openning in which browsers (like making your site always open in Chrome). You can even set it to ask what browser you want to use when you try to open certain links (like your site), very handy for debugging a new site.

    Thread Starter bernardremacle

    (@bernardremacle)

    Thank you very much for your help, James. It is appreciated. Bernard.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Specify Browser to Use WP-CLI wp admin Command’ is closed to new replies.