Ok a bit of a rant, but I've been getting a lot of questions about this lately and I want to just address it here.
Now, I created a YouTube video on this so I get that I'm in part to blame for some of this, as well. I accept that blame (How to Create a Social Network Using PHP).
However, let me be clear about where I stand...
I don't think that if you're trying to make a name as a coder in 2014 and beyond that building a social network is the way to go.
The era of the big social network ala Facebook and Google+ is coming to an end. Not that Facebook, Twitter, G+ are going anywhere... but building the next big social network is not going to lead anywhere.
Everything social is going more and more niche. Snapchat, Instagram, Vine, etc... are all examples of this.
If you want to get into the "social" game... then do one of two things:
1) Build a social app (Snapchat, Instagram, Vine, etc)
2) Build a niche social network (Match.com, WishList Insider, etc)
If you're building a social app... I can't really help you there.
But, if you're going to build a niche-oriented social network... building it from the ground up is the worst idea in my opinion.
There's plenty of existing software that is really good and can help you build your niche site WAY faster than starting from scratch.
WordPress, BuddyPress, and WishList Member is a LETHAL combination that I'd highly recommend.
But, if you're doing that... you should be focusing on the content, community, and convenience your site provides... not on coding it by hand.
So... understanding the video below is good to know. But, right now... I wouldn't recommend doing this.