In order to get to Whimsyshire you need to spawn a portal with the item called Staff of Herding. Once you have the staff you can open the portal to Whimsyshire as many times as you want.
Getting the Staff of HerdingGetting the Staff of Herding can be a somewhat time-consuming process, but as said above, you only need to craft it once on your account (unless you want to enter Whimsyshire in a seasonal character).
You firstly need the Plan: Staff of Herding to be able to craft it. These plans drop from Izual on Act IV upon death, and are not all that rare. The best way to get them is to farm him in Adventure Mode until they drop.
The items needed to create the Staff are:
1) Black Mushroom. These will spawn randomly on the ground in Cathedral Level 1 on any difficulty, and you must click on them for the item to appear. Farming it is done by running trough Cathedral Level 1 as fast as possible, but they are rare, so be prepared to do a lot of runs.
2) Leoric's Shinbone. This item will randomly drop when you click on the fireplace in Leoric's Manor in Act 1. Just use the waypoint to get there, and go to the first room on the right side before going up the first set of stairs. Click on the fireplace at the end of the room, and hope the item drops. Getting this will take a lot of runs, but luckily each run is really short.
3) Liquid Rainbow. This item is really annoying to farm, because you need a lot of luck! To get do, travel to Path of the Oasis waypoint in Act 2. Look around this map for an NPC called Zaven the Alchemist, which must be saved from a pack of mobs. He is not guaranteed to be there, so recreate games until you find him.
Once you find and save him, he will open up a dungeon called Mysterious Cave. This cave has a small chance to spawn a chest called Mysterious Chest, which drops the Liquid Rainbow. The chest is not all that rare (around 33 % chance to spawn), and can spawn in either Level 1 or Level 2, so make sure you clear the whole dungeon.
Upon finding the chest, click on it, and all party members will get one Liquid Rainbow each.
If you have Adventure Mode unlocked it can be a lot faster by looking for the bounty which wants you to clear Mysterious Cave Level 2. This will guarantee that Zaven spawns the dungeon needed.
4) Wirt's Bell. This item is sold by Squirt the Peddler in Hidden Camp Act 2. It costs 100k gold, so it is by far the easiest item to get.
5) Gibbering Gemstone. Go to Fields of Slaughter in Act 3 and start looking for Caverns of Frost. It will not always spawn, so you might need to create a new game a few times to find it.
Once you are in the cave, look for a unique mob called Chiltara. She usually spawns on Level 2, but can also spawn at the first level sometimes, so clear all of the dungeon this time as well.
Chiltara does not have a 100 % spawn chance, but she is not really that rare after her spawn chance was increased by a lot in RoS. However, she only has a small chance to drop the Gibbering Gemstone, so it will take a lot of farming to get the item.
Open the portal to WhimsyshireNow that you have all the materials, go to the blacksmith to create the Staff of Herding. Have it in your inventory and use the waypoint to The Old Ruins and head northwest to Old Tristram Road. You will very soon see a rainbow colored rift there, and the Ghost of the Cow King will spawn. Talk to him, and you can now click on the rainbow colored rift to get teleported to Whimsyshire!
If you are after the portrait frame, check out the guide to obtaining the Rainbow Portrait Frame.