1. MAKE SURE TO CLEAN OUT THE INSIDE OF YOUR PUMPKIN AS MUCH AS POSSIBLE.
Since they're moist, any bit of exposed pumpkin guts will start to mold quickly. Clean the surface of the veggie and the interior with a teaspoon of bleach per one quart of water. (Putting it in a spray bottle makes it easier to apply the solution to the whole pumpkin.) This will sterilize the gourd, killing any existing bacteria. Let it dry fully before you start carving.
The bleach comes into play again post-carving, giving it an extra-good cleansing. Submerge your creation in a bucket filled with water and 2/3 cup of bleach.Leave it there for up to 24 hours to let the pumpkin soak in the bleach solution.
3. APPLY PETROLEUM JELLY.
As an extra layer of protection, put Vaseline on the carved edges. This will keep them moisturized and prevent the edges from drying out too fast. If you don't have Vaseline, vegetable oil or WD-40 works, too. But since all three are flammable, avoid putting a real candle inside your pumpkin—use a flame less votive instead. Don't put on the jelly before you clean the pumpkin with bleach, either. Since the jelly is trapping the moisture in the vegetable, it will trap in the bacteria along with it if you didn't clean the gourd first.