Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing site as root site for a new network #112

Open
geminorum opened this issue Feb 21, 2017 · 4 comments
Open

Existing site as root site for a new network #112

geminorum opened this issue Feb 21, 2017 · 4 comments
Assignees
Milestone

Comments

@geminorum
Copy link

Apparently there's no way to use an already active site as root site of a new network.
Suggesting a dropdown of available sites on new network page.

@JJJ JJJ self-assigned this May 11, 2018
@JJJ JJJ added this to the 3.0.0 milestone May 11, 2018
@JJJ
Copy link
Collaborator

JJJ commented May 11, 2018

I've wanted to build this for a while now, so maybe it's time.

@carlomanf
Copy link

carlomanf commented Nov 29, 2018

I need to build this same feature for another project, so I'm happy to help out. As far as I can tell, what needs to be done is:

  1. Add new entry to wp_site for the new network

  2. Switch the network ID of the existing site to the new network ID, in wp_blogs

  3. Add the following extra fields to wp_sitemeta. (Did I miss any?)

site_name
admin_email
admin_user_id
registration
upload_filetypes
blog_upload_space
fileupload_maxk
site_admins
allowedthemes
illegal_names
wpmu_upgrade_site
welcome_email
first_post
siteurl
add_new_users
upload_space_check_disabled
subdomain_install
global_terms_enabled
ms_files_rewriting
initial_db_version
active_sitewide_plugins
WPLANG
_site_transient_timeout_theme_roots
_site_transient_theme_roots
_site_transient_update_core
_site_transient_update_themes
_site_transient_update_plugins
user_count
blog_count
can_compress_scripts
recently_activated
registrationnotification
welcome_user_email
menu_items
first_page
first_comment
first_comment_url
first_comment_author
limited_email_domains
banned_email_domains
new_admin_email
first_comment_email

@carlomanf
Copy link

Another thought. There should maybe be an entry added to the options table for that site, indicating which network the site was previously part of, for reference purposes. Probably not the plugin doing this itself, but at least providing an action hook enabling a developer to do this if they wish.

@MLutt
Copy link

MLutt commented Dec 28, 2019

I managed to work around this issue by creating the network with the already existing site's domain, then switching the already existing site to said network and deleting it there, and removing it from the network afterwards (the site does not get deleted, but all the duplicate references are - it is a nasty workaround since the site still "spams" the "available sites" pool tho.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants