Every time I make bread and put it in a ziplock or plastic wrap it goes moldy in 3-4 days. Does anyone know what I can put in it to make it last as long as store bought bread? 
Your enemy is moisture. Due to the airtight plastic, moisture will gather on the surface of the bread, which is the happy place for mold.  If you don't store your bread in plastic wrap, you won't get mold.  Yes, now you face the opposite problem - as the moisture is no longer stopped, you end up with hard bread, instead of moldy bread.  So you want to control the environment of the bread that too much moisture can't assemble, at least not on the surface of the bread, still moisture escapes as slowly as possible. That's what breadboxes are for - usually. Unfortunately, these days you can get breadboxes that are as air tight as plastic wrap.  Okay, the good advice would be to get a decent breadbox or clay pot, as clay also regulates moisture.  What can you add to your dough?  Two tablespoons of vinegar. Note that this won't buy you as much time as proper storage.  The last option, for completeness, would be to get moisture absorbing silica gel packets. They are available with FDA approval for food products and you can put some together with your bread. 