There are multiple ways to do this. One would be to change the values in the database directly (explained here). However, this easily introduces errors, so I don’t prefer it.
The other method is to use grant_super_admin()
with the user’s ID. The default admin’s ID is 1 and there are various methods to find other users’ ID’s.
Say the ID of the user you want to make a super admin is n
. This code now needs to be run (at least) once. One of the easiest ways to make sure it will be is to download the functions.php of the active theme.
You could just add it to the top of the file and it will probably work. But it is safer to run code inside hooks. In the TwentySeventeen theme this could be the twentyseventeen_setup()
method. Just add this line
grant_super_admin( n );
Now visit the site, and make sure it worked. Then you can safely remove this code again.
Related Posts:
- What are options are there to implement a multi language site
- WordPress Multisite Multiple child theme
- Create multiple subdomains for multi-site from a database
- How to map a specific multi-site blog to a folder?
- WordPress Multisite. Can domain be used instead of subdomain?
- Built to scale, or worry later?
- Multisite Subdomains result in 403 Forbidden
- Set subdomains live in a next step
- using 1 form shortcode (si or cf7) for all multisite sites [closed]
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- Is there any fundamental difference in developing a wordpress multi-network site?
- merging two multisites
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Should multi-language site using multi-site architecture have default language in base site?
- Multisite Installation: how do I setup global search?
- Redirect loop (only for multisite network admin)
- favicon and multi site
- Register email as username
- Recover from failed multisite conversion
- Help with updating a wp_get_sites to get_sites and sorting by alphebetical order
- Multisite Subdomain Using More Resources Than Others?
- Can I use multisite functions in a single-site installation?
- Cookie nonce is invalid – Multisite
- Multisite setup on VVV with bedrock
- Trouble with switch_to_blog()
- WordPress Multisite prevent direct access to subdomain
- WordPress mutisite migration
- WordPress multisite change language
- Multisite, multiple domains per site
- delete_user_meta : how to delete all the metadata of a given user (witout SQL)
- Multisite Network Localisation
- Within the database, where is the flag which says that a user has Super Admin rights?
- Can set_transient() be used in multi-site?
- What would you recommend for hosting 10+ individual wordpress websites?
- Redirect only posts to New Domain
- Image problem – Multisite image upload broken
- problem with main site (root domain) redirects to subdomain (multisite)
- Upload file type not permitted even if explicitly registered as upload_filetypes in the db (multisite)
- web.config breaks the themes for sub-directory multisite
- Add a user to a specific blog when they register?
- Redirect & permalink problems after moving multisite to a new server
- Optimizing Query used for a Shortcode
- Different use for WordPress Multisite
- Multisite User Sync Question about blog authorship
- How to enable error logs and debug mode in WordPress using Azure Cloud?
- WordPress multisite suddenly malfunctioning
- Multisite Redirection to new domains
- Register submenu on network menu from the subsite
- How can i define the order of blogs in a multisite network manually (like pages)?
- new multisite, old db
- Multisite sub-directories IIS 7.5 change media/uploads location
- One Domain, Two Installs of WordPress
- add_rewrite_rule not working in WordPress Multisite
- Create a page for a theme only
- How do I find where the current value of the option ‘registration’ in the SQL database?
- Can’t access Dashboard of a Multisite WordPress. Chrome results in “ERR_TOO_MANY_REDIRECTS”
- How do I get the site url from a Block (within the block editor)
- Strange multisite issue where all sites return same id with get_current_site()
- Creating a subdomain network in a subdomain
- Multisite – One Site with multiple URLs
- Sub-sub folders of WordPress Multisite subdirectory
- Delete all user’s meta without knowing all the ‘key’
- Allow editors to switch sites (Multisite)
- Activation Account Email
- moving tables between multisite installs
- Best Practise: Linking to WPMU sites from other sites
- Stylesheet and JS linking error in WP multisite nested path
- Can I run multiple blogs from my local machine
- Trouble with SQL SELECT inside switch_to_blog()
- WordPress Multisite and how to apply sef urls only to specific sites
- Custom css – WordPress Multisite
- Multisite htaccess file causing segfault (Segmentation fault 11)
- Multisite Smtp Server
- Images uploaded after adding multisite do not get loaded in any domain of the multisite network
- Migrating from domain mapping plugin to native domain mapping
- “Multisite support is not enabled.” After Multisite Config Changes
- String translation within WordPress multisite with i18n not working on all sites
- Add new sites on the same level as the parent URL in a multisite
- Search returns “Nothing Found” on a sub directory
- Define default settings for new sites on multisite network with mu-plugin
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- Multisite + wp_mail – Route Via Site Conditionally
- WordPress automatic Login on other page?
- Multisite: How to bypass wpmu_signup_user_notification and add my own notification logic?
- Changed singlesite to multisite, but new site shows Maintenance
- MU domain mapping without using a plugin
- Multisite authorization error 401
- Multisite Demo Data for New Site
- Responsive Wordress Site – Serve different post types to each device
- Should I use MultiSite for a subdomain based wp site?
- Multisite – mix sites that use subdomains with sites that use paths
- How to apply specific plugins to affect all sites (Multisite Network)
- Is there a way to have wordpress 301 versus 302 urls by default?
- first load of the page gives 404 error
- Some Subdomains on a Multisite Install Not Found
- personal_options hook on WordPress multisite
- Multi site root site installed on subdomain, with child sites as subdirectories
- Integrating WordPress for blog and other content pages in a web app
- WordPress Multisite restict user access
- WordPress MU: Cookie error when trying to login on network WP instance