So i installed the wp admin package, but i can't seem to get her working, an error pops up telling me xdg-open doenst exist.. For install i used:

wp package install git@github.com:wp-cli/admin-command.git
Installing package wp-cli/admin-command (dev-master)
Updating ~.wp-cli\packages\composer.json to require the package...
Registering git@github.com:wp-cli/admin-command.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.385 seconds
Analyzed 6619 packages to resolve dependencies
Analyzed 474197 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: wp-cli/admin-command:dev-master 384f6d3
 - Installing wp-cli/admin-command (dev-master 384f6d3)
Writing lock file
Generating autoload files
---
Success: Package installed.

Now checking if she's there

wp admin --info
'xdg-open' is not recognized as an internal or external command,
operable program or batch file.

So what's going wrong, how can i get the wp admin command to run? btw, im running WP-CLI 2.0.1 on win10 from powershell. Any help would be greatly appreciated.

  • 1
    I'm not sure windows is supported. Checking this ticket, it seems to yet focus on Linux (xdg-open) and Mac (open). You could create an issue on their GitHub – kero Nov 1 at 9:51
  • So no wp admin support for win ? @kero :'( – DGRFDSGN Nov 1 at 9:53
  • Ticket filed @ github.com/wp-cli/admin-command/issues/15 – DGRFDSGN Nov 1 at 10:00
  • Waiting for pull request to test usage of 'start' on win platform – DGRFDSGN Nov 6 at 11:33
  • Can you run php -r 'var_dump(PHP_OS);' from your powershell and if so, what does it return? – kero Nov 6 at 12:00
up vote 1 down vote accepted

This happened due to Windows not yet being supported.

With PR#18 this was resolved, update the package to the latest version and it will work on Windows machines.

So xdg-open is not supported on Windows, therefor the code has been updated to check for a Windows OS and use start Check out this repo if you cant wait for the merge with master.

Will leave this Question here untill everything is merged, so people experiencing a similar problem have some reference. Thanks @king-kero @schlessera for the quick support@github!

  • It is already merged into master, so happy wp admining ;) – kero Nov 15 at 13:11
  • 1
    oh joy! :) thanks again @kero – DGRFDSGN Nov 15 at 13:12
  • @kero, so i ran, wp package update Using Composer to update packages... Updating dependencies Resolving dependencies through SAT Looking at all rules. Dependency resolution completed in 0.389 seconds Analyzed 6740 packages to resolve dependencies Analyzed 486363 rules to resolve dependencies Package operations: 0 installs, 0 updates, 0 removals Generating autoload files Success: Packages updated. PS> wp admin --path='d:/d/sites/wp__1' 'xdg-open' is not recognized as an internal or external command, operable program or batch file. Is there something im missing? – DGRFDSGN Nov 15 at 14:03
  • 1
    I'm not so familiar with this myself. Sounds like you have an old version of the package again. Try asking it on the GitHub – kero Nov 15 at 14:47
  • @kero will do thanks! – DGRFDSGN Nov 15 at 14:50

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.