This paper examines empirically the effects of the WTO and RTA membership on the extensive and the intensive margins of trade. Using disaggregated data for a sample of 177 countries, the main findings of this paper are that WTO membership tends to increase the number of products traded between members (extensive margin), and tends to increase the average sales per product line (intensive margin). I further detect substantial heterogeneity when I examine these effects for various subsamples of the data (e.g. by the degree of product differentiation or the level of development of a country). This demonstrates that many of the aggregate effects estimated in the existing literature (e.g. Rose 2004) hide a substantial amount of variation in the WTO's effect on trade. Finally, accounting for multilateral resistance as in Anderson and van Wincoop (2003), I find that the WTO effect becomes insignificant, while the RTA membership boosts trade between members and between members and outsiders at least in the aggregate level.