Owner: David Dean
Type: WPMU Plugin
Created: 2007-03-08 19:19:32
Last Modified: 2008-06-30 20:05:56
njsl-sites-005.php (468 download(s))
njsl-sites-004.php (2309 download(s))
njsl-sites-003.php (916 download(s))
njsl-sites-002.php (712 download(s))
njsl-sites.php (880 download(s))
This plugin provides an interface to the underlying multi-site ability of WPMU. For these settings to be effective, each address designated as a site (domain + path) must be pointed by your web server at your WPMU installation.
short_open_tag = off compatibleGreat job! Thanks for sharing. Tested in 1.1.1. A small bug though: removing a blog from one site is not working. It has to be added to a different site. Maybe a default site should be set up for unclaimed blogs.
ovizii, I read it 5 times myself and don't know why I need one of these.
You only need this if you want to run blogs on multiple domains, e.g: blogs.abc.com and blogs.xyz.com
Hey David, this seems promising. I'm having some trouble with it though. I updated the wpmu-functions.php. What is the path I need to point the domain to in the "sites" admin when entering in a new domain? I have the new domain pointing to my wpmu install (http://domain.com/wpmu) but I'm a bit confused.
Still working on this. My setup is running mu 1.2.1 currently. I bought a new domain and pointed it to my mu install. Went to the "Sites" admin page, added that domain (without a path) and assigned a newly created blog to it. When I type in the new domain I get the "No WPMU site defined on this host" page. Any one have any idea how to make this work?
Ok. Here is what I have so far. Set the "path" to "/". The new site domain by itself still delivers the "No WPMU site defined on this host" and when I add in the whole path "/wpmu/site-name" I get a 500 error. Can't figure this out for the life of me. Is it a problem with my host?
Ryan, having a little trouble visualizing your setup but will try my best. At the web server level, you have the domain you want pointing to your wpmu install by its file-system path. Then you created a site in WPMU and set the site path to "/". Then you created a blog, and assigned it to the new site. What is the path on the blog itself? If it is not "/", set it to "/" temporarily and see if you are able to access the new site.
Just downloaded and used 002. Brilliant! Just brilliant!! Saves so much of the time I was spending doing this stuff manually! Thanks!
Hi again, I've had a play with the Assignment function and its a bit buggy. When I assigned a blog to a newly added sight it missed the 'dot'. For example, I assigned blog.siteone.com to sitetwo.com and got blogsitetwo.com (missing 'dot'). When I tried to assign it back to siteone it ended up as blogsitetwositeone.com (no dot and merged both domains). Mind you, what I was really after was the domain adding option so this tool is still awesome! Thanks.
Thanks for the note, shane! We don't use subdomains so that part was basically untested. I adjusted it to grab the 'dot' from the existing domain. This will also keep it from compounding when you move it later (it looks for the first 'dot' to make the cut).
I'm testing this plugin. Done everything as you say here above.. But when I go to newdomain.com then it tries to redirect to newdomain.com/wp-signup.php and then some error message comes.. browser error message saying that "Too many redirects occurred". Any idea what that can be ? Also. Can I use this plugin so that I can use my WPMU system for specific new domains without anyone being able to register on them. Say 1) blogdomain.com --> everyone can signup 2) domain1.com --> uses wpmu install but noone can signup 3) domain2.com --> same as domain1.com, that is, no one can signup. Because I want to be able to use the same code base for many different client sites. Thanks.
Also one more question. In my newdomain.com/wp-admin/themes.php I get this error: "Fatal error: Cannot break/continue 1 level in /var/www/blogdomain.com/wp-admin/admin-db.php on line 669. Any idea?
Thanks. This is just what I needed. I was trying to do this with manual SQL scripts and getting strange errors. Looks good so far.
fannar, Is there a blog defined on the newdomain.com site? If you're using 002, that is taken care of, but if you are using the original, you will have to assign one to the new site. As for limiting signups per site, you have full control over each site individually, but you need to go to the admin section of a blog on each site to make the changes. Finally, that error is not one I've seen before. What version of wpmu are you running? The only advice I can offer is to change the settings in Site Admin | Themes, and see if that makes it happy.
Hey Dean, got it working although only for the front page. All post and page links gave me 500 errors. Not sure if that's my server's config or something with the plugin. Also wanted to ask if there is any chance this could work in mapping sub-blogs to top level domains with out the user becoming capable of adding on sub-blogs to the new domain. So a blog at domain.com/my-blog could be mapped to new-domain.com. Users traditionally like to have their own domain name instead of a sub-directory. I opened a ticket a while ago for this functionality but it was shot down. I guess WordPress.com want to keep this for themselves. Any chance you'd work on a feature like this?
Hi there. I already two WordPress MU installations and I want to merge them somehow and use this plugin. Do you have an idea how to do it ?
ryan, since you're tryin to move from subdirs (VHOST=no) to subdomains (VHOST=yes), you could try the 'Move' feature, edit the blog options from the Site Admin 'Blogs' menu, then flip that switch in your wp-config.php.
Seems to be exactly what I was after, thanks. One problem that I remember seeing mentioned somewhere: - Secondary site is missing its CSS And another that I have not seen mentioned anywhere: - After a perfectly clean install of Wordpress MU and this plugin, creating new sites gives me SQL errors about wp_2_options tables or similar (site-specific that have not been created yet?) The CSS problem is my real barrier for using this plugin or Wordpress MU at all. Any pointers you can give would be much appreciated.
Also, I have a fresh install of WordpressMU 1.2.1 and 002 of this plugin, and I am getting the same error as fannar, above: Fatal error: Cannot break/continue 1 level in /home/content/m/i/n/miniatonadmin/html/wp-admin/admin-db.php on line 669
Went into the database and manually duplicated the allowedthemes option for the second site in sitemeta table. Would be nice to not have to do that. Anyway, thanks for a really killer plugin!
Great job on the plugin. I finally got it working. If anyone is stumbling across how to use this for multiple domains it's quite simple. Create a new wpmu site based on the subdomain option (not the subdirectory option) then after loading the plugin go to sites under siteadmin and create a new site with your domain (example.com) and path (/) and click add. Then point your domain at your wpmu install. The only gotcha is you have to copy the allowedthemes option manually in the wp_sitemeta. Otherwise, it's perfect!
I too, with a wordpress-mu-1.2.1 site, the new 002 plugin, received the dreaded "Fatal error: Cannot break/continue 1 level /j/random/path/html/wp-admin/admin-db.php on line 669" when trying to change the theme.
I'd been using instructions from the following discussion:
I am a little lost with this... I have website.com and I purchased another domain today, I created the website within wordpressmu using the plug in, otherwebsite.com. Using a domain pointer where do I point it to? Because wordpress is setup with subdomains is that wrong? Because I can only point it to http://website.com/otherwebsite
I am a little lost with this... I have website.com and I purchased another domain today, I created the website within wordpressmu using the plug in, otherwebsite.com. Using a domain pointer where do I point it to? Because wordpress is setup with subdomains is that wrong? Because I can only point it to http://website.com/otherwebsite
Thanks David, it works. The only thing to patch: put the js code above the form, or blog unassignment menu won't work. Keep up the great work! Vitaly
sorry, unassign doesn't work either way, though the blogs do show in the menu.
Mikael, The non-existant table errors don't break anything, but look bad. Did you find that having an allowed_themes setting fixed the 'cannot break / continue' error?
kp2575, If by 'domain pointer' you mean a DNS pointer (CNAME), that is not sufficient for WPmu. You need to have access to the apache config on your web server to point both domains at the same filesystem directory, not URL path.
ult, Unassign requires you to enable the 'ENABLE_SITE_ZERO' constant in the plugin file. It is at the top. Without that enabled, current blogs are shown above the list box, to avoid confusion.
Hi, I have around 40 undeveloped domains that I have parked with ads on it. I dont get much out of parking, so I thought why not develop them, promote them and get some useful traffic and then put adds also. But I really do not have patience to develop 40 individual websites. Now, I have 2 options, develop all 40 websites with 40 wordpress installation or somehow use WPMU to do the magic. Can, WPMU single installation, take care of 40 domains pointing to it. Can this plugin help me ? I couldnt find any documentation on how to use it.
I recently did this write up (going to have some make some slight changes because of this plugin), for all those that are interested: http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping/
David, Yes, manually fixing the allowedthemes removed the 'cannot continue/break' problem. Before I found that out, I did look into the code, and there really is a simple bug there which only crops up if there are no themes defined. Any idea for a simple fix on the allowedthemes sitemeta problem? It is starting to be a chore to always have to go into the database to fix that one line. That said, thanks again for the plugin! It really has made it simple to host, say, a temporary wedding site for a friend.
Hmm... The plugin says it is cloning allowed_themes, but the right option would be allowedthemes (allowed_themes is legacy, I think). Anyway, it is not fixing that problem for me, sorry to say, but it did remove the ugly error messages when creating the site.
I tested this on two domains names. The first one, I had originally domain mapped. I deleted to try the plugin. It went relatively smoothly, but site_admins, allowed_themes, and some of the database uids were not properly translating to the new one. So I made the changes manually. I used a brand new never mapped domain name, did it and site_admins didn't translate and neither did allowed_themes. So I had to manually enter those. Now I just look and I have both allowed_themes and allowthemes. I did a google search and apparently people talk about this, but no one has a clear answer. drmike submitted it to trac, but no one touched the ticket since (2 months ago).
nims, if you are running all the domains on one server, and you have access to the web server configuration on that server, you can use one WPMU install. In that case, you could also use this plugin.
Mikael, I posted an update with both allowed_themes and allowedthemes, but you can just add it to the list if you'd prefer. It seems that if your WPMU instance began as 1.0 (like ours), your sites will have allowed_themes. If you began with 1.2 (like yours, I'm guessing), you will have allowedthemes.
Yes David, I am running ( will be actually ) all my domains on one server, basically shared hosting that provides me to host unlimited domains. But I might not have full control on the server configuration. My host doesnt allow wildcard DNS, so I cant have subdomain structure. Would it be possible to use this plugin in this situation.
This almost does what I want, but I'm wary of the tables being confusing to a database administrator. Two ways around this: 1) instead of wp_ how about the name of the site as prefix? 2) instead of putting everything in the same database, how about switching database according to the site being accessed? I personally prefer (2) but I appreciate that it is a deeper change as wp_sites table would need to always be accessible regardless of which database holds the current site's content. Thanks, Martin.
nims, you should be alright with subdirectories. The only issue is whether or not you have enough access to the server configuration to make it work. You need to be able to set the "DocumentRoot" in Apache or "Local path" is IIS, for each domain, to the same WPMU install.
Ok will try with subdirectory structure and let u know if it works. Where can I find instructions to use this plugin and the "Documentroot" changes that are required to be made.
When creating a new site - the new site doesn't have the 'Site Admin' menu enabled even if I log in as the admin. I'm using WPMU 1.2.3 and the 003 version of this plugin. I believe that at some point using WPMU 1.2.1 and an older version of this plugin this wasn't happening. Looking at the wp_sitemeta table I notices that no meta keys and values are added for the new site - shouldn't it?
correction in wp_sitemeta these meta keys are added: blog_count, site_name, blog_count_ts shouldn't these be added automatically as well: illegal_names, menu_items, blog_upload_space, upload_filetypes, fileupload_maxk, site_admins ?
Can I use this plugin to redirect a third level subdomain into a second one of the same main domain? I have installed WPMU in blogs.domain.tld because I don't want to mess files in domain.tld with my other CMS (installing in root domain is not an option) When new blogs are created they got this url pattern: blogsname.blogs.domain.tld Is there any way to make the url look like this: username.domain.tld? Thank you in anticipation
Hi. I love the idea of a multisite manager. I will have ~ 10 domains for users to choose from in the beginning so I was starting to hack something myself but hey why reinvent the wheel. However I'm just a little puzzled where in the installation to put the php file. Just in plugins dir ? No can't be that simple. But since no one here barks a single word about it, it sure must be a simple solution. Anyone wanna point out the direction for a retard like me ? Kindly //Marcus
Hi again. How do you enable to choose from multiple domains on in wp-signup.php ? Currently I only have the first domain to choose from. This is probably obvious as well.
mihaigrigori: I tried to make it easy to add your own fields to the list of those copied when making new sites - they are at the top of the file (options_to_copy). If it is not working without these fields, I will post a new version with them. I have not had a chance to try 1.2.3, does adding these keys fix the issue you found?
Hi David.
The one field that mihaigrigori needs is site_admins. Copying just admin_email and admin_user_id the user logs in, but doesn't has admin rights. I've just used your plugin to set-up a new domain on a 1.2.3 install and that's the only thing that was left.
Great plugin, btw. ![]()
th x alot after alot of time it works with me .. u do not need to make any apache changes just point the 2 domains to the wpmu installation folder one request .. how can i add a drop down menu in registration page - in any domain registeration page - with the domains avaliable for members to register @
Greetings! First of all, great plugin! I have a question regarding plugins and widgets. I've created 2 additional sites (web1.mydomain.com and web2.mydomain.com). I want to be able to manage widgets and plugins separately for each site. When I login to a particular site, I'm presented with a widgets sub-panel under 'Presentation', but none of the widgets that I've uploaded are present. The 'plugins' link on the menu bar is also not present. Am I missing something obvious? Any help is appreciated. Thanks!
Thanks a lot for the plug-in David. I have installed v3 of the plug-in on WPMU 1.2.4. Got a question - what is the purpose of the directory path in the Sites tab of Site Admin? Would it let me run a separate site with different code, plugins and themes on the same database? TIA
fruit_bat - I have no idea how widgets work; is that an included feature or another plugin? You will have to enable plugins for each site you make to have the 'Plugins' option appear on the menu bar.
how can i add a drop down menu in registration page - in any domain registeration page - with the domains avaliable for members to register @
when I click on "presentation" in the admin area, I get this error: Fatal error: Cannot break/continue 1 level in /home/writestu/public_html/mywebsite/wp-admin/admin-db.php on line 669
To get the plugins do: INSERT INTO wp_sitemeta (`meta_id`, `site_id`, `meta_key`, `meta_value`) VALUES (metaId, yourSiteId, 'menu_items', 'a:1:{s:7:"plugins";s:1:"1";}'); metaId = The last meta_id in your db table + 1 yourSiteId = The is for your site from wp_site
atgeist: sounds like you need 'allowedthemes'. Are you using version 003? If so, you should clone your base site (or another working site) when creating a new one to avoid this issue. As a workaround, you can copy a row in the wp_sitemeta table with a meta_key of allowedthemes and your new site id. If you find a new cause for this problem, please post it here and let everybody know.
Could you be more specific when you say "For these settings to be effective, each address designated as a site (domain + path) must be pointed by your web server at your WPMU installation." ? Do you mean to do this VIA CNAMES? Or does my website-example2.com documentRoot need to specifically be pointed to the documentRoot of main-wpmu-installation.com ? Or does this have to be done via apache? I am using a virtual dedicated server and think I have attempted everything possible. Can you please clarify this or point me to an install guide. Thank you!
rumshopnews: If you are using apache, the DocumentRoot for the virtual hosts should both point to the directory of your wpmu install. You could also use something like: "ServerAlias website-example2.com" in your "main-wpmu-installation.com" vhost definition. That would be the most straightforward.
Hi David. Thanks for the response. The problem was with my Godaddy server. Simple Control panel makes "domain2" always point to /home/domain2/public_html and you cant seem to change it to /home/domain2/public_html even by setting Vhosts (only the wildcards will point to domain1). So for anyone using a Godaddy server with Simple Control Panel the best thing to do is not setup the second domain at all. Just go and setup a DNS Zone for it, then do your Vhosts as you would. That seemed to have worked so far for me.
Excellent Plugin. Can you tell me that how can I show the plugins tab in the newly created site? I see a similar question from "fruit_bat" but the response is not clear enough? Thanks
umermk: Site Admin -> Options -> all the way at the bottom, under Menus. If it's not there, let me know and I'll see if we can work it out.
Thanks dean for your prompt response. I have enabled the plugins from: Site Admin -> Options -> all the way at the bottom, under Menus. My problem is that in the newly created site there is no PLUGINS menu at the top. Orginal Site Menu: Dashboard - Site Admin - Write - Manage - Comments - Blogroll - Presentation - PLUGINS - User - Options - Polls - Tags New Site Menu: Dashboard Write - Manage - Comments - Blogroll - Presentation - "????????" - User - Options - Tags
umermk: looks like this might be a larger problem. Is 'Tags' put in by a plugin? it would be worthwhile to try disabling it and see if things change.
ddean: thanks for the quick response. My installation work fine with the original website and does not behave the way it is mentioned in the link that you suggested. It is only the new site that does not have "Site Admin" and "Plugins". However, I have found a way to get around it, although a bit inconvenient but works for me. I move the blogs on the "new site" to "original site" and configure them and after configuring take them back to the "new site". I use the same technique for deleting the blogs created in the "new site". Anyway, congrats on writing this excellent plugin. I hope that you will soon find some time to fix the remaining loose ends.
Here is perhaps a dumb question -- does this plugin work if you have your wpmu using subdirectories rather than hostnames? I installed it, and it seems like the plugin expect hostnames. Thanks!
Klark: yes; it works fine with subdirectories; that's how we use it. Think of the 'site' as a container, and you are making a new container for blogs, not just a new blog. Maybe this plugin is not what you want.
Ah, ok. thanks. I think I need a plugin which can manage blogs within a site. ie. clone a blog, etc. thanks.
Hi I tried reading all the comments but am not too clear on how to get this to work... 1) I installed wp-mu-1.2.5a at the public_html/ dir. 2) I put the plugin in wp-content/plugins, enabled plugin checkbox and activated it. 3) My main domain is http://domain1.com. I want to add http://domain2.com as part of the multi-site. 4) domain2.com is currently an addon on to domain1.com (stored as subdirectory under domain1's public_html/ (ie publich_html/domain2.com/). 5) In the Sites page, I did a Add Site, with http://domain2.com and path of / 6) Under Blogs, I created a new blog with URL to http://domain2.com, siteURL to http://domain2.com 7) But when I go to http://domain2.com I don't see the the new site. What am I doing wrong? Thanks so much for your help. This tool sounds so cool I can't wait to use it!
tiffy: First off, this should be a mu-plugin. I guess it would work as a regular plugin, but I haven't tried it. That might cause problems.
Hi. When I try to upload a file while writing a post for a blog on the "new created site"; I get {Warning: Invalid argument supplied for foreach() in /data/wordpress/wp-includes/functions.php on line 1221 -- Warning: Cannot modify header information - headers already sent by (output started at /data/wordpress/wp-includes/functions.php:1221) in /data/wordpress/wp-includes/functions.php on line 1356 --File type does not meet security guidelines. Try another.} Any ideas?
I think "File type does not meet security guidelines" is the key to the solution. How can I set the allowed file extensions for the "new site"?
umermk: you need to go to Site Admin | Options and enter the relevant file extensions in the "Upload File Types" box.
Hi there, I noticed that Ryan had the same problem as me where he is able to assign a second domain to a blog using the plugin but when he clicks on a post or page he gets an "Error 500 - Internal server error". I was wondering if anybody found a solution to this? I set WPMU up in a sub-directory of one of my sites http://mysite/wpmu/ with new blogs set to be created in subdirectories of that: http://mysite/wpmu/blog01. Now when I point my domain “http://newsite” at the WPMU installation blog01 comes up fine and is working perfectly. I can log into the admin area using the new domain and even get search results without any problems. When I click on a link to a post or page I get the 500 error. In the plugin I have the domain set to “http://newsite” and the path set to “/”.
FYI: You've got a short PHP open tag on line 1029 that should probably be changed to a full one for the benefit of those with short_open_tags disabled.
charlievaughan: sounds like it might be a rewrite issue. Since you got a 500 error, you can check your server logs for the details
I've had troubles with the cookie, users with the second domain couldn't login. The error message suggests that the cookie is not enabled, while the original domain works fine. Can anyone help me to check this issue?
And it seems that all new blogs are clustered under the first domain, there's only one user "admin" under the second one.
I just resolved a problem that I have been trying to resolve for 12 hours. I wanted to pass along the mistake I made that was preventing this plugin from working. When you enter your domain at Site Admin >> Sites >> "Domain http://", be sure you do not use "www." in front of your domain. If you do, WPMU will show you the "No WPMU site defined on this host" page.
The clone feature seems to be failing. It has no effect on creating new sites. Details: I entered information for a new site to be created. Next, I selected a site to clone, checked all the "Options to Clone" check boxes, and clicked "create site." The result was a new site without any information from the cloned site. I tried it again with only a few of the "Options to Clone" boxes checked, but had the same result. Is anyone using the latest version (I downloaded last week) and able to clone?
I got this message: No WPMU site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance. Anyone have any idea how to fix it?
Thanks for the script works great... also works with addon domains... just need to specify the same directory for addon domains... anyway I do have a problem... my main blog uses www prefix for all pages... and for some reason this setup keeps stripping the www prefix.. I've tried using a wp plugin redirector to add it back in and also used the htaccess file but both methods go into a loop and after a few loops ends up failing... any way I can get my www prefix back for all domains within wpmu? using your plugin?
paintballguns/Raptor235 - In addition to fixing the .htaccess file, check in wpmu-settings.php and you will find the responsible code near the top of the file. This is a design choice by the WPMU team and not something that can be changed by a plugin.
Hello, Great plugin. It is exactly what I needed but I'm trouble setting it up. This is what I have: a) MU installed and working on domainA.com with subdirectories b) A shared hosting account with Cpanel and a great web host who can make needed changes c) This plugin installed and working. My Goal: I currently have 10 wordpress installs of different domain names and maintaining the themes, updates, plugins for each is something that I'd rather not do 10 times. My goal is to get each blog imported into MU. I have the ability to create addon domains and parked domains. Now I have added domainB.com as a parked domain on my host. I went to Site Admin > Blogs and added a blog called domainB. Now if I go to DomainA.com/domainB I see a blank blog. My goal is to be able to go to DomainB.com and see that. So I then went to Site Admin > Sites > Sitename = domainB ; domain = domainB.com; path = /domainB/ (I even tried /home/user/public_html/domainB/) then when I go to domainB.com I get: No WPMU site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance. Is it at this point that I need to tell my webhost to do something? Any assistance will be much much appreciated. Thank you!
@ garg - don;t create the blog first, just go to Sites and create it there. It will do the rest.
hi there I've lost some major rankings because of lack of www prefix... is there anyway I can implement this while still adding the www prefix? if i use htaccess right now I just get into a infinite loop... pls help thank you
So if I create sites and then add a new theme then I'll have to manually edit the database for the new theme to appear in all the older sites?
Is there any kind of install documentation on how to go about setting this up? I've read through the comments but it's a bit confusing. I've dowloaded v004 for WPMU 1.3, installed the plugin into mu-plugins, and have a vhost in my webserver which has blog.domain1.com and blog.domain2.com pointing to the mu-install. My mu install is set up to use subdirs and was initially configured on blog1.domain.com. I have blog.domain1.com/testblog up and running but I can't access it form blog.domain2.com/testblog it gives me a wp login page and says that blog does not exist.
Hi, Yes I'm a n00b with this wordpress stuff so please forgive my ignorance. So I now have 2 sites blog.domain1.com and blog.domain2.com and know how to assign a blog to each site. Is there a way to have a blog assigned to both sites?
There's a sever lack of how to for mu stuff. Here's my post on how to make multisite manager work. Cheers, Jerry
Dean, there's a 'bug' in the call to create a blog. All the blogs are being created as non-public. This means that they have noindex, nofollow on their meta tags are don't get spidered by google. here's a quick fix to force it to public each time. (I've no idea why anyone would not want their blog public!) $meta['public'] = '1'; wpmu_create_blog($domain,$path,'New Site Created',get_current_user_id(),$meta,(int)$new_site_id);
When I enabled site zero and the 'catch orphaned blogs' settings I noticed that the domain for site zero is 'holding.blogs.local'. Is this intentional so that site zero is never reachable or am I supposed to customize this setting to a real domain? Thanks, Hugh
@thecuriousfrog: you are correct - it is intended to make blogs unreachable while you are moving them. There is no entry in the sites table created for the holding site, so changing it to a real domain would probably not make the held blogs reachable
Hi, thanks for the plugin! I have tested it in depth and I have some observations: 1) When you create the new site the "site name option" is ignored. It only use the default "New site created" 2) It would be nice to add sites in bulk 3) A new option called "upgrade all websites" which call the wpmu upgrade function for all sites created with the plugin would be usefull Thanks again for your wonderful work
First off, this is a great plug-in. It's precisely what we needed. I have a question though--when creating a new site, I choose the "root" site to clone, along with the admin user and password. However, after cloning it doesn't seem to actually clone the admin user... it is the same ID. In other words, if the password or info for the Admin user is changed in the new site, it also changes for the "root" or cloned-from site. Is that expected behavior? I would have figured each site would receive its own admin account. Thanks for all your hard work!
HELP! I installed the plug in and made the mistake of editing a subdirectory over an existing subdirectory on my MU blog. I need to back out of the change and can't seem to get to a place that will let me undo what I've done. If I overwrite this blog I loose about 3 weeks worth of work. Please help ASAP!
I have installed the plugin and everything works with creating new blogs with subdomains at the main domain that was used to setup mu. Everything else is working with setting up new domains with the multi site manager. All the new domains work too. However, the new domains that were setup using multisite manager don't seem to support the mu settings. By this I mean that the subdomains created do not work. To clear things up: site1.com is created using original mu install - setup wild card support for subdomains - site1.com with subdomains works perfectly Installed multi site manager and setup new domains - All domains work as individual blogs - registerring as individual blogs work - I enabled wild card settings for subdomains on all of the domains - User can register,create new blog, receive confirmation email but will get 404 error at new blog. Can't confirm new blog to set it up. Any ideas
Also, is there a way that if a user registers at any site that they will automatically be logged into all sites. Feor example:user registers at dddd.com and then visits gggg.com. Can he login to gggg.com and be an author there too.
Google plugins, translated to chinese on http://w.api.li/s/4/
Love this! Got it working this weekend along with Richard's blog post - WordPress Mu with Domain Mapping - http://bui4ever.com/web-itecture/wordpress_mu_with_domain_mapping
@tigerclaw: when this was created, site name was kind of a bolt-on option in the sitemeta table. Updates might have changed how that is stored; I will have to look into that. As for bulk additions, the functions for adding sites are modular, so it would be mainly an interface issue.
this is great and much needed, thank you. two suggestions: 1. separate the functions (for reuse) from the plugin, or let the plugin detect when its loaded out of the regular environment, and then display nothing. it would be nice to stay in step with the development more easily. 2. allow for passing user_id in add_site: function add_site($domain, $path, $cloneSite = NULL, $options_to_clone = NULL, $user_id = get_current_user_id()) {
oops, hit submit too soon.. a way to skip the blog creation within the function would be nice as well. for now i've just taken the function out and gutted it a bit. thanks again!
@tigerclaw: was looking over the code and realized that 'New Site Created' is the title of the blog on the new site, not the site itself
Trying to parse the advice of the voices in my head... In using v4 of the plugin, should I disregard the bui4ever directives to ensure that the site ID's match the blog ID's? I deduce yes. When deleting a site, (not using the holding site), some plugin-specific tables are left behind. Is this because these plugins do not use $wpdb->sitemeta? Cheers.
@musnake: yes, you can safely disregard that directive; can you say what plugin(s) leave tables behind? I don't know of any that make site-linked tables, as opposed to the usual blog-linked tables
Hi - this plugin looks like it's exactly what I need. So, thanks. I have installed it and am a bit confused over how it actually works. I gather from reading through the above thread that the idea is not to create a blog and then move it into the site - tired that first, but it got very messy so I deleted the new site and started again - but if you want a blog on a different URL just create a new site and a blog is created automatically? This certainly seems to be what happens ("Do not clone" was selected in the dropdown). However, no user seem to be created for this new blog and it does not appear in the list at SiteAdmin>Blogs, so I'm not sure how to login, change it's name from "New Site Created", edit, post, etc. The domain and everything seems to work just fine! *thumbsup* Am I missing something? It's the end of a long day trying to work out how to do the work of this plugin by tweaking the apache rewrites, so I quite possibly am.
@Sebastian: it looks like get_site_option is still bugged. For the time being, you should clone your first site when creating new sites. Ensure that site_admins is checked, and login to the new site with the same acccount.
There are posts in the forums regarding this plugin and db cleanliness. For example andrea_r's post, http://mu.wordpress.org/forums/topic.php?id=7533
Any input on this? I am not trying to create a debate, just trying to figure out if i should go for this or the manual method. Cheers![]()
I was having problem cloning when creating a site and the clone wasn't copying the 'illegal_names' meta information. So I had to do the following changes, to get it to work properly: {{{ diff wp-content/plugins/njsl-sites.php /Desktop/269532107_njsl-sites-005.php 56,57c56 < 'first_post' => __('Content of first post on a new blog'), < 'illegal_names' => __('List of invalid names'), --- > 'first_post' => __('Content of first post on a new blog'), 218,222c217,221 < < switch_to_site((int)$cloneSite); < < foreach(array_keys($options_to_clone) as $option) { < $optionsCache[$option] = get_site_option($option); --- > > switch_to_site((int)$cloneSite); > > foreach($options_to_clone as $option) { > $optionsCache[$option] = get_site_option($option); 224c223 < --- > 229c228 < foreach(array_keys($options_to_clone) as $option) { --- > foreach($options_to_clone as $option) { 1199c1198 < if (!empty($all_site_options)) foreach ($all_site_options as $count => $option) { echo '
Let me try the above comments with the
tag not sure if it's going to work.
diff wp-content/plugins/njsl-sites.php /Desktop/269532107_njsl-sites-005.php 56,57c56 < 'first_post' => __('Content of first post on a new blog'), < 'illegal_names' => __('List of invalid names'), --- > 'first_post' => __('Content of first post on a new blog'), 218,222c217,221 < < switch_to_site((int)$cloneSite); < < foreach(array_keys($options_to_clone) as $option) { < $optionsCache[$option] = get_site_option($option); --- > > switch_to_site((int)$cloneSite); > > foreach($options_to_clone as $option) { > $optionsCache[$option] = get_site_option($option); 224c223 < --- > 229c228 < foreach(array_keys($options_to_clone) as $option) { --- > foreach($options_to_clone as $option) { 1199c1198 < if (!empty($all_site_options)) foreach ($all_site_options as $count => $option) { echo '
@jonkristian: I don't see anything in that thread about db cleanliness, and am not sure what that would mean in this context anyway. At any rate, if you have doubts, I encourage you to go through the manual process and compare the results.
Thanks for the reply, you are right there's nothing in there about db cleanliness, so scratch that. I should try to find time to do a compare. What I was concerned about was if this plugin would create a messier db compared to the manual way and also if it has other downsides compared to that.
@jonkristian: the only difference is that the plugin creates a new blog on the new site, rather than moving an existing blog. The only downside is that you have to find something to do with the 5-10 minutes you saved by not editing database tables by hand.
Hi, I am using njsl-sites-005.php with two domains. On the first we use a custom permalink format: /%year%/%monthnum%/%day%/%postname%/ (which is as I see the same as the Date based but the option is set to "Custom") On the new domain I have the very same setting but when I click on a post title I get a 404 not found error instead of the post content. Am I missing something? The 404 error is not generated by Apache (nothing is reported in the error.log) Any hint? Many thanks Matteo
I just set up the Multi Site Manager, everything is working fine, but I accidentally assigned the wrong blog to a new site without realizing it. After saving is there a way to get the blog back?
You must be registered and logged in to post comments. Not registered? Click here to get your free account!