Olive oil can go rancid quickly if it is not properly stored. Exposure to heat, air and light are three controllable factors that affect how quickly olive oil will go bad. If you store your olive oil properly, you will be able to enjoy it for months, if not longer. It may mean getting rid of your pretty bottles and storage containers, but increasing your olive oil's longevity, especially if it's expensive and rare, will be worth the sacrifice.
Pour your olive oil into your opaque container if it isn't already in one. If you have a large amount of olive oil, pour it into several smaller containers.
Place tight-fitting lids on all of your storage containers. Exposure to air, or oxidation, will cause olive to turn rancid more quickly, especially if your oil is unfiltered. Using small containers and keeping them full will minimize oxidation opportunities.
Store your containers of olive oil in a cool, dark place, away from heat, such as a kitchen cabinet, pantry, or wine cellar. The Olive Oil Source states that the ideal storage temperature is 57 degrees F, though your medium-quality oil shouldn't suffer significant change in taste if kept at or below room temperature (below 80 degrees F).
If you want to maximize how long you preserve your oil, you can fill partially full containers with inert gas, available at wine shops, to minimize changes of oxidation.
Store excess olive oil used for cooking in the fridge so it won't go rancid. Keep only a one-month supply out of the fridge. These oils do not typically have delicate flavors you would need to preserve. Delicate extra virgin olive oils can be harmed by condensation formed in the fridge, so they should instead be bought in small quantities and stored out of the fridge.
Let refrigerated oil come to room temperature to remove cloudiness and return it to a liquid state if it has solidified at all.