I have an 06 STI. And Im no machanic I was just trying to use logic. So I was pulling out of my work parking lot and my car started to studder as I pulled onto the road going into 2nd gear. I looked and my fuel level was low. (I have been actually running it lower than I normally would due to finances at the moment) So my first thought was to get gas. So while still studdering I pulled into the nearest gas station and filled up. I had trouble cranking at the gas station but it finally cranked and I started off down the road when the studdering got worse and the car basically choked out. I could get it cranked but it would bog out when I pressed the gas and cut off at idle. I sat for a min and could not get it cranked again and the battery died? So I bought a new battery still doesnt crank I checked all fuses. So I ask around and the general consensus was fuel pump. So I bought a new fuel pump. Got the fuel pump in and it cranks fine but idles extremely rough. Backfires when revving. It will only rev for a 20-30 seconds after being cranked after that it bogs down and cuts off. And its the same if I just crank it and let it idle it will idle fine for a few seconds then down and it will catch it self 2-3 times before it chokes out. I dont know exactly what to do or where to look for the problem. Spark Plugs? Injectors? Fuel Pump Relay?
did you change fuel filters? Look for the usual culprits, broken or pulled vacuum lines, dirty MAF and or throttle body
My RS did this once...I let it sit for a couple hours (yeah, it sucks) but after that it started working again...I think it had to let some air get out of the fuel system. give that a try.
as i was reading, i thought all of these...check the pcv system, check the maf, check the hoses all over. A vacuum leak could cause this, as the first 20-30 seconds the car runs on a rich map, then reverts to standard. If you have a vacuum leak or something, this will cause the car to stall.