WordPress.org

Support

Support » Plugins and Hacks » Hacks » Multisite global settings

Multisite global settings

  • 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Save it in one of the global tables.

    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.

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

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

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

    Not normally but it is possible.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multisite global settings’ is closed to new replies.
Skip to toolbar