Here's how I moved my 20g to a 40b. I had to do it quickly as after moving my 20b over a bit, the filter died...
1. Put new sand into the 40b and put new saltwater in it (I did about 25g of new saltwater, matching my salinity to my 20g) - Wait until the temp got to normal before I went further.
2. Empty about 10g of water from the 20 into the 40.
3. Move 90% of the rock from the 20 into the 40. Now your fish should be swimming with just a little water / rock.
4. Wait an hour or so and test your new tank's water.
5. If the water is fine, put the stock into the new tank, then the rest of the water (given you were careful and didn't stir up the water too much...which I was)
6. Top off the new tank with some more new saltwater.
I had to add a bit more rock into my 40g, so I did that over the next month by only adding one rock at a time so I didn't send it into a cycle.
Hope that helps. Others can chime in if they want, I won't be offended. But that's how I did it because I had to move somewhat quickly... I did not lose any stock (3 fish, 2 corals) during the transfer. I tested a lot over the next week or so and never saw any ammonia or nitrites.