Set BuddyPress settings programatically
I’m working on a WordPress Multisite installation and I need all of the sites to have the same configuration (themes, plugins, settings, etc.). I’m using BuddyPress on all of the sites and I want them all to have the same components activated. Currently I’m using Ansible to provision everything and make some calls to the WP CLI, one of which runs a PHP script that is supposed to save the BuddyPress settings, along with settings for other plugins. The script seems to run fine; I update
bp-active-componentsand I run
bp_core_install()and pass the components to it to create all the necessary tables. However, when I go to a site and visit
wp-admin, the active components get reset to the default components. I’m guessing there is an action somewhere that runs when I visit
wp-adminor the BuddyPress settings page for the first time. Where is this happening and can I turn it off? Or what would be the best course of action for achieving what I am trying to do?
WordPress 4.9.5, using multisite
BP Multi-network 1.0.1, network-activated
bbPress 2.5.14, network-activated
Running inside a vagrant box using CentOS 6
P.S. I am probably using a bunch of outdated stuff but I inherited this project from another team
- You must be logged in to reply to this topic.