The MU forums have moved to WordPress.org

Database Replication and MU-Plugins (5 posts)

  1. DarkPepe
    Member
    Posted 17 years ago #

    Hi, Im trying to get every newly created blog to have som standard configurations for a plugin installed under mu-plugins.

    The plugin in question is MediaWiki Markups for WP ( http://zechs.dyndns.org/wordpress/?page_id=126)m I have setup some options for the plugin (it cames with an options menu under OPTIONS main) on the Main BLog, but when a new blog is created there is no options filled on this plugin.

    I dont Understand how MU replicates the databases for each new blog where is the master template ? can I edit the variables for the plugin included on the new databases.

    Thanx a Lot!

  2. drmike
    Member
    Posted 17 years ago #

    I have a plugin that doesn't fill in either. I finally put the table creation within the new blog functions within wp-includes/wpmu-functions.php

    Hope this helps,
    -drmike

  3. imagenow
    Member
    Posted 17 years ago #

    :drmike: could you please show me this procedure step by step?

    Thanks!

  4. andrea_r
    Moderator
    Posted 17 years ago #

    "I dont Understand how MU replicates the databases for each new blog where is the master template ?"

    It doesn't replicate hte databse, it adds more *tables* to the database - a set ofr each user.

    "can I edit the variables for the plugin included on the new databases."

    Yeah, open up the plugin file and edit the php to the default value you want. Then, when a new blog is created it will be like you want.

  5. DarkPepe
    Member
    Posted 17 years ago #

    well, My final solution was to add "INSERT INTO $WPDB->options" all the variables that I want preconfigured on the blogs, I did this on wp-admin/upgrade-schema.php

    I dont know if this is OK, at least is working on the "plugin side" and also the blogs are working fine, the only "strange" thing is: now the config values has new ids... but WP seems to handle it ok atm...

    Thanx for your help guys.

About this Topic

  • Started 17 years ago by DarkPepe
  • Latest reply from DarkPepe