All options you select from the default blog will be used for new blogs on a wpmu installation.
After a new blog is created, the first time the dashboard is loaded, the options from the default blog will be copied into the new blog option table.
This is interesting in many situations on a WPMU installation.
If you want to automatically install some plugins with every new blog, there is already a plugin for free, look here http://wpmudev.org/project/wpmu-plugin-manager.
With wpmu-plugin-manager you can have control over the plugins, but not over the setup of the plugins.
So you need to configure all the options and settings every time a blog is created.
To get rid of this nasty work, I developed this plugin.
How it works:
Just create a blog as default blog.
Install all the plugins on this default blog you like to run on everey new blog.
After you made all the needed configuration to your plugins and they work as they should work on every new blog, your work for this blog is done.
Now all you need to do is, go to the main blog to Admin/default-blog-options.
First you have to enter the blog ID of your default blog.
When done, you will be able to select the options you’d like to have in every new blog.
Once you have all the options selected and saved, you are finished.
Every time a blog is created, the blogoptions are copied from the default blog like you selected before.
Please give me some feedback, and let me know about the bugs you find.
:-Sven
Download: Default Blog
and support us: PAYPAL


I can’t express enough how grateful I/we are that you are developing this plugin. I’ve been searching the net for weeks trying to find a plugin/code snippet or anything relating to putting “our sites custom default options and plugin settings” into our new blog users settings right off the bat. I’ve only seen comments saying that sort of thing just can’t be done. Your approach was so simple that no one else thought of it. Hat’s off to you my friend. Upon installing your plugin my heart sank a bit as it wouldn’t work for me out of the box. Each time I set my default blog, I’d get the message that the default blog was saved, but the form would always be set to the main blog (ID 1). I was stuck. This morning I went through your code and I “think” (I’m far from good at php) I found the problem.
line 9 admin.inc.php:
code if ($defblog_id != “”){/code
should actually be:
code if ($defblog_id == “”){/code
Changing this opened up all the doors for me and I was able to select options as expected from the tabs, and the form would show my chosen default blog selected in the drop down on refresh. Nice!!! So my test user created his new blog and entered his dashboard to find the settings had been applied. Thanks so much!
Although I found a bug. When going into the newly created blog dashboard I got a php warning at the top of the page.
codeWarning: implode() [function.implode]: Invalid arguments passed in /opt/lampp/htdocs/wp-content/plugins/default-blog-options/functions.inc.php on line 217/code
This was caused because I had not elected to choose any pages when setting up the “default blog”. implode failed because the pages variable was unset.
my hack for this error was to change line 217 on functions.inc.php from this:
code$new_pages=get_pages(“include=”.implode(“,”,$pages));/code
to this:
codeif($pages!=”"){ $new_pages=get_pages(“include=”.implode(“,”,$pages));}/code
Once again… I’m in no way a php coder. I know just enough to get myself in trouble. So certainly there is a better way. But it’s working for me.
Oh yeah… I’m working with 0.22 – beta.
Hope this is useful for anyone reading.
Cheers!
I am using the plugin on 3.0, but when I select the default blog, it says the ID is saved, but does not allow any further options…for example when I go to edit which pages should be copied, the plugin does not pull the pages of the blog I selected as a template. In fact, it doesn’t pull any pages – the only option is to delete all pages.
Afer doing some testing on it, it looks like the categories is about the only option that is working properly.
Honestly, I just want to echo others saying this plugin will rock! I’m really glad you are making efforts to get it working.
Any time frame on a fully functioning version for WP 3.0?
Hi, we are trying to use your plugin but it has a lack of functionality or BUG, as you want :-)
When the plugin call the function copy_plugins, it only update the blog option active_plugins, it’s a mistake! Because if a plugin needs database tables or something else that it called with the action activate_plugin, it breaks.
Here is the correct copy_plugins that call WordPress functionality
// Updating plugin settings of blog
function copy_plugins(){
global $defblog_id;
$global_blog_plugins = get_blog_option(SITE_ID_CURRENT_SITE,'default_blog_plugins');
// Copy active plugins
if($global_blog_plugins["active"]==true){
$active_plugins=get_blog_option($defblog_id, 'active_plugins');
foreach ($active_plugins as $plugin){
$return = activate_plugin($plugin);
if (is_wp_error($return)){
//The plugin can't be activated
}else{
//plugin activated OK//
}
}
}
}
Another question, in all plugin you use pieces of code like this
switch_to_blog($defblog_id);
$current_template=get_option('current_theme');
There is a function more efficient, we have a very big blog to duplicate and the plugin crash
$current_template=get_blog_option($defblog_id,'current_theme');
I can’t save default blog. It Always back to Main blog? I use BB 1.2.4.1 and Mu 2.9.2
Hi @All, Thanks allot for all your feedback.
We are just too busy at the moment.
The plugin is still in development and will become stable in the nearest future.
Sorry for the delay.
If you can get this working I would be happy to donate/pay you for this. This would be the greatest plugin ever created if you can just make it work. Please please get this working there are many of us out there in the community whose lives would be changed by this. Sorry for the drama, but I am serious. This plugin will put food on my table.
Thanks again.
Josh
Hi Josh,
I need detailed informations for getting your bug fixed. Which part doesn’t work?
Sven
Hi Sven
I just get the blue tabs at the top, but nothing is clickable.
hold on let me try the new version….
Is it working?
Hi Sven Sorry it took me a few days to get back to you. I am getting this error when I press the update button under each of the tabs and the settings are not being saved.
Warning: stripslashes() expects parameter 1 to be string, array given in /home/attorney/public_html/newyork-electrician.net/wp-includes/wpmu-functions.php on line 262Thanks for your time and effort
Josh
This looks to be a GREAT plugin, it is exactly what I’ve been looking for and am in dire need of having. Right now I have it installed but all I get are the tabs. I really can view anything under those tabs like in the screenshots. I’m more than willing for a good donation if this gets to working. I’m sure there are many who feel the same way.
Pleas try the next update. It will come the next hours.
your plugin (all versions) is giving this error.
subcontent is null
subcontent.style.display=(subcontent.id==subcontentid)? “block” : “none” //”show” or hide sub content based on matching id attr value
tabcontent.js (line 96)
Hi Wasi,
this problem will be solved, if we have inserted the WordPress GUI. This will be in the next weeks.
Thank you!
Sven
Hi there, any plans to update the plugin for WordPress 3? The UI looks like its broken. This functionality is vital and should be built into the core! Cheers.
Hi Gareth!
I’ll look for this in a few days. I’m a bit busy at the moment.
Thank you for your info.
Sven
I get the same problem as Justin and Vinicius. Also with the latest BuddyPress and WordPress 2.9.2 No content is being sent.
What I did that “seems” to have solved the problem, I delete line 9 and 21 of admin.inc.php :
if ($defblog_id != “”){
and the corresponding
}
I’m not actually sure why that is there. Maybe the Author can enlighten us.
Hi Steph,
sorry for answering so late. I’m a bit busy, so I will fix the bug in some days.
Thanks for your Information!
Sven
thanks steph, this is my solution
if ($defblog_id == “”){
$defblog_id = “1″;
}
include(“admin-default-blog-defblog.php”);
include(“admin-default-blog-posts.inc.php”);
include(“admin-default-blog-pages.inc.php”);
include(“admin-default-blog-links.inc.php”);
include(“admin-default-blog-cats.inc.php”);
include(“admin-default-blog-tags.inc.php”);
include(“admin-default-blog-design.inc.php”);
include(“admin-default-blog-plugins.inc.php”);
include(“admin-default-blog-settings.inc.php”);
include(“admin-default-blog-options.inc.php”);
It make sense ;-) The bug will be fixed in the upcoming version in the next hours.
Thank you for your work!
Sven
I noticed some issues on my wordpress MU (2.9.2) test site. The Default Options page is always blank, it’s only display links on a blue menu: Blogs/Posts/Categories…
I instaled the plugin, activated the site wide feature, then created a new blog.
Maybe i’m missing some step, anyone could help me? This plugin will be very appreciated!
I can’t get this plugin to work. It installs correctly (sitewide) but when I click in my admin panel to set the default blog, all I get is a nonworking menu. No other content. I have the latest Buddypress and WPMU. Maybe a plugin conflict?
Version 0.2 beta released:
- Tags can be copied too. Default blog can be selected in a dropdown list.
- Inserted design, plugins and settings tabs with settings for it.
Today I’ve made some important updates:
- Categories can be copied now.
- Post an page meta where copied now.
- Parent pages where set correct.
- Default blog couldn’t be set after setting main blog to defaul blog. Now it works.
- Tabs where shown now. CSS and JS wasn’t linked correctly.
Just download Version 0.14 beta and get your update.
Happy testing! ;-)
If the new version is experimental and shouldn’t be implemented on live sites, why was it pushed as an upgrade? Also not sure I understand what the two bugfixes you’re talking about were. Content was getting deleted for all existing blogs upon dashboard visit? If this were really the case that would be a serious problem, but I never noticed anything like that in using this plugin…
Maybe you hadn’t blogs on your page before you activated the plugin.
New version is out:
0.11
Heavy Bugfix: Content of existing blogs have been deleted, if dashboard was visited and plugin was active. Now plugin won’t run anymore for blogs which have been created before plugin was enabled.
Bugfix: Warning won’t be shown anymore, if blog dashboard was visited the first time
New function: Added tabs to the admin area.
Sven, is it possible to have the pages and categories of the default blog be copied into newly created blogs as well?
This plugin copies pages, posts, links and blogoptions. The categories won’t be copied yet, but later.
Hi Benjamin,
the new version allows to copy categories.
Have fun!
@RoyDeanJr,
Thanks for the detailed bug report, and sorry for your trouble.
The plugin is 0.1, and it looks like it needs more attention to work probably.
We will have a look into it and let you know.
I will try to reconstruct your bug and will see how to get back the post.
But it wouldn’t be before eastern.
Sven, Thank you for your reply.
I looked at the data and it seems the records with post_status=publish and/or post_type=post have been deleted from the wp_?_posts table.
Without a backup there does not seem to be a way to get it back.
Maybe you could use the “send to trash” technology in WP so that if it happens again the admin can recover from the trashcan.
I am in the process of editing all of the latest posts to flag them as publish and post.
Sven, how do I get the posts back from the affects of Default Blog?
I’m very very sorry, but you have to use your database backup.
I’ll take care for these errors next week. Until Sunday I’ll be too busy to do anything.
Thank you for testing!
Sven Wagener
thanks for this plugin buddy, here is some bugs ive found:
I’ve tried it with bubbypress but it afected my main blog that was already created…
This plugin would be much better if you just select a blog and click COPY, because then we would be able to use any blog as default for a new one without the need to check all those options again and again…
just wana to CLONE A BLOG
Thats not possible at this time and in a few time. Maybe later.
The Plugin does not seem to have any effect on new blogs (after installation & setup). I double checked if all desired options are checked in the setup and if the Blog-ID is correct.
I am running WordPress MU 2.9.2.
guys your plugin doesn’t work on wpmu with buddypress. you always mention that it is going to affect only new blog, but ALL the posts of my main buddypress blog (id =1) have been deleted (not even put in thash!), after i set a child blog as default blog (id = 5). such things may never happen.
I had 4 blogs and a number of users had contributed and now nothing shows on the blog pages. I did check the option to delete all posts, pages and blog links and then proceeded to visit existing blog dashboards. Then when I visited each blog I saw nothing! What happened to everything?
I did some research and I see that there are still post revisions in the wp_1,2,3,6_posts tables. How do I resurrect those records so the posts come back to life?
The problem is no solved in Version 0.11. The problem was, that the script runned on all blogs, including the old blogs. Now old blogs won’t be touched anymore by the plugin.
I also removed the warning on the dashboard, if the blog was visited the first time and added Tabs to the admin for better navigating.
Hi
I will test this straight away. This is a remarkable plugin for WPMU. Bravo!
This plugin makes my life complete, it just needs the option to also »get all categories« from the main blog!
is that possible somehow?
thanks!
We will add categories in the next version
Yes, this should work. You can use the plugin to manage default widgets options.
Does this handle widget configuration also?