Creating Secure Client Areas using WP Multisite and WPMU DEV plugins! - TUTORIAL

Hello WPMU Devers, Ive been away for a wee while doing other stuff but I love WP and WPMU Dev so I will always be around! (is that sighs I heard...surely not)

Today I thought Id right a quick tutorial or perhaps a better word is an overview of how to create secure client areas using Wordpress Multisite and some great plugins from....yep you guessed it right here at WPMU Dev.

A recent client of mine was looking for a solution to this and I have to say it did rack my brain somewhat on how to achieve it, mainly because she had single site WP installed and I wanted to keep it as simple as possible. However the leap to multisite isnt to great and my client took to it no problem! So lets get cracking:

What you will need:
An install of Wordpress Multisite
The New Blog Templates plugin
The Multisite Privacy plugin
And depending on what you want to do within the client area; Marketpress plugin (my client is a photographer and wants to sell her images to clients via the website, from a secure area only they have access to)

Got all that? Good, lets talk about the structure:

So we will have our main blog/site which the public can access; describing the company/person, displaying their work in a portfolio all the usual stuff.

Then we will have subsites, children if you like, one for each client. Depending on how you setup multisite each client will have their own url which will look something like: http://client1.yourwebsite.com OR http://yourwebsite.com/client1

OK Im going to skirt over quite a few things as Im presuming you know a bit about WP and installing plugins etc, so Im taking it that you have Multisite and all the plugins listed above installed and network activated etc.

The Setup:

Right first off we need to create a subsite which will act as our template for all our client areas. So create a new site from the network admin and call its something like "Template - DONT delete". This site will never be used per se as its simply to be used in conjunction with the Multisite Privacy Plugin!

So now we have or subsite template lets set it up with everything we need/want to get copied over for all other client sites (all the constants). For example my client was selling her images so I setup a product template, with all the options etc so that when copied over all they have to do is copy the product and add a featured image saving them a shed load of time. You can go ahead and delete the default Sample Page and Hello World post. I created a new Page called "Client Area" to display the Marketpress products on but you can add what you feel is necessary here for your own project.

Multisite privacy settings should also be set at this point. The way I see it you have two ways to protect your client areas with the Multisite Privacy plugin:

1. Restrict the blog to registered users of that blog only, then create a login for you client and email it to them. For this to work it means you must disable user registration via the network admin (Settings->Network Settings->Registration Settings).

2. Use the password protection. Set this to a default password so its copied over with the subsite template and then if needed you can change it for each client if you want. There is a slight bug Ive found but Im sure it will get sorted: https://premium.wpmudev.org/forums/topic/found-a-bug-with-multisite-privacy-andor-new-blog-templates-plugin#post-387029

OK so we have setup our subsite template with all our constants, we have set the password (if your taking that option). All this means that when we create a new client area (subsite) that we have saved as much setup time as possible and the new site is ready to rock and have client specific content added to it.

Now make sure and set this new subsite (blog) template as the default: Network Admin->Settings->Blog Templates

I wont go over how to create a blog template and make it default as you can find this on the plugins Usage page.

OK well I think we are alomst there. Try making a new site for a client and then check all your settings, pages, marketpress products (constants) etc have all been copied across. Now add the content specific to that client, again when I did this recently it was for displaying images for sale via Marketpress but it could be something as simple as adding pdf's to a page or perhaps you want to setup a support ticket system or forum for each client. The possibilities are pretty much endless here.

Client Access - How do I get in dammit!

Now you have two (maybe three) options:

(1)Email the client their unique url to visit where they will be prompted for their logins or password depending on your privacy option.

(2)Or setup a page on your main blog site called "Clients" or something. And add a link to their client area (subsite). This is what I did only I added an image with a caption to link the clients to each of their own areas. (3) But I reckon you could also do something similar automagically with this plugin: https://premium.wpmudev.org/project/blogs-directory/

Now I realise Ive skipped over a lot of the in depth setting stuff etc but like I said its really a conceptual overview to guide those of you wishing to do something similar.

I hope this helps someone!

If you have any questions ya ken where the box is :wink:

Cheers