In many cases, white bread goes moldy faster than whole wheat bread does. However, storage, preservatives and brand can play a role in how long it takes for mold to form on bread.
In general, dense breads build up mold slower than lighter breads, which means that white bread tends to go moldy faster than other types. However, most commercial breads contain antimycotic preservatives, which inhibit mold growth. Therefore, commercially produced breads go moldy slower than homemade bread, regardless of type.
Storage can also play a big role. Keeping bread in the fridge or storing it in a cool, dark place helps prevent molding, as mold likes to grow in light, warm and humid places. Freezing bread can also help keep it fresh for longer periods of time.