WP Hive » Installation and Configuration

Why activate the plugin in each blog

(5 posts)

  1. deuts
    Member

    After successfully setting up another blog, it appears that everything's alright already. However, your installation procedures states that we should activate the wp-hive plugins in each blog. Why? What will happen if we don't, it appears to be working good already anyway.

    I'm just actually curious.

    Posted 3 years ago #
  2. ikailo
    Developer

    The plugin handles the requests for the three files: robots.txt, sitemap.xml, and favicon.ico.

    Because each file is normally located in the root dir: eg: example.com/favicon.ico, this is a way to ensure that the correct file from wp-content/wp-hive/example.com/ is served depending on the site that it is requested for.

    You also need to ensure that these files don't exist in the root directory.

    Posted 3 years ago #
  3. TommyM
    Member

    I thought this was a bit of a pain, so I did some searching for a way to automatically activate it and came up with this.

    in wp-admin/includes/upgrade.php

    add

    $wphive_plugins = array('wp-hive/wp-hive.php');
    update_option('active_plugins', $wphive_plugins);

    before

    update_option('blogname', $blog_title);
    update_option('admin_email', $user_email);
    update_option('blog_public', $public);

    The wp-hive plugin should now be activated on each new install.

    Posted 3 years ago #
  4. lakong
    Member

    Tommy, is there a simple way to activate all plugins in the plugin directory automatically for each new installation? I would like to simply load all of my plugins in the plugin directory and each time I point a new domain at the primary domain and run the 5 minute install have the plugins in the directory all activated.

    Posted 3 years ago #
  5. TommyM
    Member

    Hey Iakong,

    I think you can put more than one plugin to activate in the $wphive plugins array. If so you could just add all the plugins in your folder to the array (I haven't tried this myself yet!).

    If you wanted it fully automated you might want to write a script that creates the array for you from the folder.

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.