Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#27289 new enhancement

Add populate_network action

Reported by: rmccue Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch reporter-feedback
Focuses: multisite Cc:


At the moment, populate_network_meta is the only hook available to do extra work when a new network is created. However, this is called before the initial site is created when installing the first network. This means it's impossible to do certain things on network creation, such as creating new sites.

(I want to be able to create a new site on network creation so that the network always starts with two sites: the migrated main site and another site.)

Change History (3)

#1 @wonderboymusic
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#2 @jeremyfelt
4 years ago

I've wanted this too.

There are two scenarios for populate_network(). In the most common, we're moving a single site install to multisite and applying initial configuration. In the other, it is called separately to create a new network. When a new network is created manually, the steps for assigning a main site are skipped and you're on your own to complete the setup tasks that need to run.

Where does the action make sense in this? If it makes sense for both cases, we may need to pass some contextual information. If it only makes sense for initial install, populate_network may not be the right name for the action.

#3 @chriscct7
3 years ago

  • Keywords reporter-feedback added
Note: See TracTickets for help on using tickets.