Multisite Setup

I am wondering if multisite setup can be setup to automatically modify the setup file and create subfolders for each user upon registration? Anyone knows? If so, a tutorial or information on how to do it please. Thanks in advance.

There is no tutorial on doing this as it’s not a very common question. You can create your own post-registration procedure, either by forking the Login plugin, or simply by adding a new form action to the registration form, to add your own custom code (either PHP or via a shell script) to create another subsite and set it up.

See Customizing the registration form and Add your own custom processing to a form

Thanks a lot for the reply and information. Going to read about it now and see what I can make happen.

What’s the goal, create a site for each user that registers?

Pretty much like a multi-user blog. Allow them their own space to write.

@flaviocopes I didn’t have much luck at all attempting this. I am sure it’s because of my limited programming skills.

It surely is no easy task, and I’m sure multisite allows this, but you need a good grade of automation in place to achieve this task, as it’s not an “out of the box” feature and it’s not exactly something you can do without a good commitment I guess. In terms of building and maintaining, also Admin is not really thought with this usage in mind so you’d need some degree of customization for that too.

Yeah…I figured it would be beyond my understanding. Was working on a little project/community for writers to be able to blog off the site to their own space. Kind of like tumblr or something. Guess it’s not going to happen. Thanks.

if you need one grav site for each user and one master grav site to rule them all (it sound like lord of the rings xD ) maybe symlinks can be usefull, I have not tested but teorically it should work, no programming needed, just an idea if you want to try alternatives

But I thought Grav has the multisite implemented. Shouldn’t I be able to activate it in the setup file? Then I should have to write a script upon registration it creates a subfolder along with the user profile. It doesn’t sound hard but when i attempt it, I don’t know where to start with the automation process.

Multisite in Grav means you can manage more than one site with just one Grav install.

You manage all the sites.

From this to get a Tumblr-like platform with automated deploys of sites upon user registration, it takes some more bits :slight_smile: and I’m sure it’s not the best way to do this, as it cannot really scale in any way, must be done differently, most probably from scratch starting simply with a framework such as Laravel.

Thanks for the insight. Greatly appreciated. I will try another route. I’ve been looking at laravel. Seems to be a clean option.

@flaviocopes Is that why I can access the sites now but users cannot modify the content? Because only I can manage the sites? I have setup multisite and have the folders copied over. I can access the site now via subfolder. How do I set it up to where the user can login to their site to write and edit posts, etc. ?

I know we have discussed my taking an alternate route and I am looking into that currently but I was wanting to ask for knowledge reasons so I could better understand the reasoning behind multisite and its functionality and capabilities in Grav.

Typically each site will have its own user/ folder under sites/. There you’ll have an accounts/ folder and users that have an entry there will be allowed to access that subsite through site.com/subsite/admin (if using subfolders) or subsite.site.com/admin if using subdomains.

I’m using subsites. I do have all the folders setup like the default install of grav. When I add the admin plug in to /user/sites/usersite/user/plugins/ it redirects me to www.mysite.com/admin and shows me my dashboard