Our group faced this problem and have a current campaign going that seems to be working, after floundering between several campaigns that never really got off the ground. These are the aspects that are included. YMMV, of course.
General ideas that have helped:
- First, and most important, whatever you're going to try, get buy-in from the players. Nothing will work if you have a player trying to push things in another direction. For example, our solution involves going a bit closer to "railroading" than a normal campaign, but that's the social contract. If the players want to get stuff done during the session, they have to accept a degree of that.
- Have the most consistently available player be the GM.
- Keep it light, keep it Crunchy. An RP heavy campaign would be much harder to do this way.
- Have a game where the party works together towards the same goals, and where secrets between players are mostly non-existent. Secrets are complicated and suck up time.
- Similarly, don't let individual PCs dominate the GM's time.
- Have episodic sessions, much like you would have in an episode of a TV show. Almost everything should be resolved in a single session.
- At the same time, have larger plots develop around the events from individual sessions.
- Must have some advance warning about which characters will be present. Plan based on those characters. (As a new GM, one of my hardest challenges has been scaling encounters based on a range of 3-6 PCs)
- Only the PCs that are present get XP. This has worked well as incentive so far, but I will probably cap the amount that characters can fall behind. Another option would be to let them get weaker than the party, kill them off, and let the player bring in a new PC closer to APL. That might reinvigorate their interest in the campaign.
- Give XP rewards (a fraction of one session's worth) to whoever writes the log of the session. This rewards and encourages involvement, gives a chance to at least partially catch up on missed XP for players who missed session, and provides a way for everyone to remember what happened between sessions.
- Give XP rewards to players for writing a story about where their character was for sessions they missed.
- Longer sessions. We game once a month for about 8 hours. This helps keep things contained within a single session.
- We also use Google Hangout to include players who can't be present. The android app lets us also have a camera dedicated to the battlemat, which helps.
Our specific campaign:
- LITERAL deus ex machina brings the PCs that are "present" to the situation for that session. This works especially well in a system with actual deities. The present PCs are "Pulled" where they need to be, and absent players' characters are "Pulled" somewhere else. This is an in-game mechanic, and is part of the plot. The Characters are aware of it.
- Ensure that party roles heavily overlap. No character is critical for any situation. We have a party of all Clerics/Divine casters, which helps with the above.
Edit: Clarified XP, and GM time issues.