Skip to content

Instantly share code, notes, and snippets.

@MikeNGarrett
Created June 10, 2014 15:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeNGarrett/080bad66e500e46fa969 to your computer and use it in GitHub Desktop.
Save MikeNGarrett/080bad66e500e46fa969 to your computer and use it in GitHub Desktop.
Grant Super Admin to WordPress user in theme's functions.php
<?php
include(ABSPATH . 'wp-admin/includes/ms.php');
$user = get_userdatabylogin('YOUR_USERNAME');
grant_super_admin($user->ID);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment