Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

hawkeye126 on "WP-CLI Network Site Meta Format Question"

$
0
0

I accidentally deleted all my super users on my wp multisite.
I did this by trying to add a new super user via the command line with the following wp-cli command:

wp network meta update 1 site_admins exampleuser

This overwrote the entire entry and set it only to "exampleuser". I believe I did not pass the value, exampleuser, correctly. Previously when I ran

wp network meta get 1 site_admins

The return value was in this format:

array (
  0 => 'username1',
  0 => 'username2',
)

I feel I can fix this problem if I know how to format the entry correctly

wp network meta update 1 site_admins exampleuser

What do I need to use for the --format parameter?
How to I enter the site admin into the site_admin network meta table?


Viewing all articles
Browse latest Browse all 8245

Trending Articles