How to "Open site shell" as admin?

What issue or error are you experiencing?

Running commands via Local Site Shell doesn’t work. The command line opens but it displays Error: You must run this command as an admin user


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Clicking “Open site shell” in the dashboard.


System Details

  • Local Version:
    Version 8.3.2+6660
  • Operating System (OS) and OS version:
    Win 11

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi, Alex.

You’ll need to be logged into Windows with an administrator account for Open site shell to work without that error.

You can check if you’re an administrator by visiting Control Panel → User Accounts → User Accounts. If you’re an administrator it will look like this:

If you’re not an administrator you could create an admin account if you have sufficient access, or talk to an administrator who set up the machine to change your account type from standard to admin if that’s possible.

Hi nickc,

Thanks for getting back to me.

I am already the administrator for Windows.
The issue must be something else…

Thanks for checking, Alex.

Does this happen for all sites?

Please can you share a screenshot of the console, as well as your Local logs?

Hi nickc,

Does this happen for all sites?

N/A (I only have this one website).

Please can you share a screenshot of the console[…]

Here’s the console error:

as well as your Local logs?

Sure, here: local-logs.zip (11.2 KB)

Thank you for the screenshot and clarification, Alex.

It’s now clear that the error comes from Elementor rather than Local or the Windows terminal itself.

It looks like Elementor expects you to run that command as a WordPress admin user. (By default WP-CLI commands run as a logged-out user.) You could try appending a space followed by --user=1 to your command:

wp elementor kit import "C:\Program Files (x86)\Local\readkit-book-elementor-template-kit.zip" --user=1

The command should then use the default admin WordPress user that Local creates (1 is that user’s ID). If you need to run it as a different user, look up the user’s ID with wp user list. You should not be prompted for a password.

If that fails, check the path, try importing via Elementor’s admin panel as mentioned in their docs or perhaps check in with Elementor support.

Oh I see… I’ll give it a try, thanks for digging deep for this one, cheers.

3 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.