WordPress.org

Ready to get started?Download WordPress

Forums

Multisite global settings (7 posts)

  1. jcnetsys
    Member
    Posted 3 years ago #

    Is there a way to save settings that can be retrieved by any site. My plugin needs to be able to have one set of settings for all the sites in the network. How can I do this without making my own table?

  2. Save it in one of the global tables.

  3. jcnetsys
    Member
    Posted 3 years ago #

    Global tables? As far as I can see each site gets its own options table. I cannot see an option table that isn't associated with a site. I was going to just use the site with id 1 to store global settings (under a different key) so that all sites could just reference that to fetch the global settings. However what if the user deleted the original site? Then there wouldn't be a site with ID 1 and that would fail.

  4. jcnetsys
    Member
    Posted 3 years ago #

    Found it. get_site_option, update_site_option. On a network site that is global settings.

  5. Also, blog #1 never ever gets deleted. at least not normally.

  6. jcnetsys
    Member
    Posted 3 years ago #

    Not normally but it is possible.

  7. And inadvised. The first blog in the network is the default single WP you started with.

    From the backend, there's no delete button for the main site. You'd have to deliberately rearrange the network to get rid of it.

Topic Closed

This topic has been closed to new replies.

About this Topic