I grow basil both indoors and out. The outdoor plants have to be watered twice a day in this 100-plus heat we are having, but they are doing okay.
The indoor plant is in a South window in my kitchen/dining area. I've been growing basil there for a few years. They never look stellar, but they look okay and the leaves taste good.
For the indoor basil plants, I move them to a much larger pot, and tear at the roots before planting to stimulate root growth. I can easily get 6 months out of a large plant before I pick them too bare to survive.
My outdoor plants are in a six inch based bed with good draining soil. I water them twice a day when it is over 100F/38C (it is 105F/41C right now.). They wilt some during the afternoon, but bounce back once the sun goes down and I give them some water. Oh, the good draining soil is needed because the soil should be moist, but not waterlogged.
Same with the indoor plants. Keep the soil moist, but don't let the soil at the bottom of the pot get swampy. I've noticed that will kill them as fast as too little water.
CD