The office is getting ready for Jim and Pam's wedding up in Niagara Falls. That means leaving "out of office" voicemails and preparing for the trip. Jim and Pam are also busy giving the staff dos and don'ts for the wedding, including no fireworks and no announcing Pam's pregnancy to Pam's memaw.
Everybody carpools on their five-hour journey to upstate New York. Once they arrive, they can all check into their hotel rooms. Jim and Pam check into separate rooms before the wedding and are not pleased to find out Andy has reserved their honeymoon suite for the night before.
A confused Michael realizes he never booked a room at the hotel and now is desperate. After Dwight, Stanley, Erin and Kelly refuse to share their rooms, Toby offers up his spare bed. Michael instantly shoots down the offer, telling Toby he's going to have to get used to sharing a room by himself for the rest of his life.
At the rehearsal dinner, Pam and Jim remind people to not let her memaw know about the pregnancy. Meanwhile, Dwight is forced to sit at the kids' table. Michael stews while thinking of how he should be sitting at the head table with the couple and their family. Michael interrupts the toasting to give his own.
Jim interrupts Michael's embarrassing speech to give one of his own. While talking about how much Pam means to him, Jim accidentally reveals her pregnancy. Michael does his best to try to save Jim's toast, but just makes it worse. Pam's memaw is shocked to hear about her granddaughter's situation.
After Michael hears the news that memaw isn't going to attend the wedding, he pays her a visit in her room. Michael thinks that memaw should encourage whorish behavior with today's women. They know how to have fun. He also makes a false promise, that Pam and Jim plan on naming their baby after her.
Andy decides to throw an old-fashioned hotel party up in his room, filled with dancing and drinking. During the dance-off, Andy does the splits and lands on his car keys, tearing his scrotum. The party turns to Pam for help, since she's sober enough to take Andy to the hospital. Pam isn't pleased to have Andy icing his balls in her room and discovers Jim is out drinking with Michael and Dwight during this time.
It's the morning of the wedding and Andy is enjoying pointing out he spent the night before with the bride-to-be. Michael was forced to sleep in the vending machine room after Dwight hooked up with Pam's best friend in his room. Meanwhile Kevin is left with no shoes because the odor caused the hotel management to throw them away.
The guests all arrive at the church for the wedding. Kevin is sporting his new toupee and tissue boxes on his feet, since he only brought one pair of shoes. Andy is still having a difficult time with his damaged scrotum and is touched when Erin offers her jacket for him sit on.
As Pam's getting ready for the wedding, she accidentally tears her veil. She calls Jim frantically and wants to meet with him. He's breathless with how beautiful she looks in her dress. Pam starts tearing up about her veil and Jim takes scissors to cut his tie in half and tells her now they are even when it comes to imperfections.
Pam and Jim keep everybody waiting in the church. Michael strikes up a conversation with Pam's mom, who is trying to adjust to seeing Pam's dad with a much younger date. The two talk about it being a terrible year for love.
Pam and Jim finally appear and are ready to marry. Michael and Jim's brothers unleash one more surprise on the couple, putting in a Chris Brown CD and recreating the sensational YouTube wedding video, as all the guests dance down the aisle.
What the guests don't know is that Pam and Jim snuck off before the wedding and got married under the Niagara Falls, before doing it again in front of all their family and friends. Jim later admits that he thought of the getting married under the Falls right after he saw that wedding video on YouTube, because he knew he would need a back-up plan, in case Michael got any ideas.