Navigate up to...
Parts you will need
Fuel filter assembly
Part Number for 04-06 STi's is 42072FE020
Part Number for '07 STi's is 42072FE030
Part Number for 08+ STi's is 42072AG140

Tools you will need

Flat head screwdriver
Phillips head screwdriver
Ratchet
Extension, medium size
8mm socket
10mm socket (or wrench)
12mm socket (or wrench)
Pliers
1 – Getting ready.
A - Use your 10mm wrench or socket to disconnect the negative cable from the battery. You may wish to cover the cable with a rag to prevent it from wondering and touching a ground.

B – open the gas cap to relieve excess pressure.
2 - Exposing the Fuel Filter cover area.
I removed my rear seat completely. I think you might be able to do it without, but it would make it a much more of a pain.
A- Remove the trunk lining. This will expose two access covers. We are only concerned with the oval one which has 4 screws holding the lid down.

B - Just in front of of the rear seat are two plastic covers about one inch in diameter. Remove those using your fingers or a flat tip screwdriver to expose the two 12mm bolts that are securing the lower portion of the seat to the chassis.

C – Remove the upper portion of the rear seat by simply lifting it upwards and pulling away.
D – Remove the two vertical braces. They are held on by 4 12mm bolts.

3 – Remove the fuel pump assembly.
A – Remove the 4 screws retaining the fuel filter cover.

B – Clean any dirt from the area. Vacuum dirt and wipe down as much as you can to prevent loose debris from finding its way into the gas tank.

C – Disconnect the two quick disconnects, electrical plug with your hand. The small fuel hose will need the pliers to pull back the hose clamp. Be sure to place a rag around the connections as you remove them as to catch any fuel in the line which may come out.
D – Using your ratchet, extension and 8mm socket, remove the 8mm nuts from the studs. Place them in an area so that they do not fall into the gas tank on accident.
E – Gently lift the fuel pump assembly from the tank. There is a float which will catch on the side of the hole. You may need to twist the assembly 180 degrees when removing from the car.
I had kind of a tough time wiggling everything so as to withdraw the assembly, being worried about bending/breaking something. On the re-install, I first loosened the single small screw which holds the float assembly. Doing this allowed the float assembly to move around and let it pass through the opening easier. And the whole assembly then went in easier, at least for me. Then, before finally inserting everything all the way down onto the tank, I re-tightened the float assy screw.
F – Inspect the inside of the gas tank for debris or rust.

4 – Changing the fuel filter.
A – Turn the Pump assembly over and remove the screw holding the float assembly to the pump assembly. Carefully pull the float to the side to expose a screw for the filter.

B – Remove the screw holding the filter to the pump assembly.

C – Turn the Pump assembly back over and lay down making sure not to bend the float rod. Using your pliers, pull away the upper hose clamp.
D – Pull down on the filter, removing it from the shaft on the top of the pump assembly. Pull the filter from the fuel hose on the lower portion of the pump assembly to completely remove the old filter.

E – In the old filter there is a rubber grommet. Remove this from the old filter and place it in the new filter.


F – Insert the lower portion of the fuel filter into the fuel hose. Be sure to put the hose clamp back on over the filter shaft.
G – Insert the upper portion of the filter over the shaft on the top portion of the pump assembly.

H – Replace the screws on the back of the pump assembly. Remember, there is one for the filter and one for the float assembly.


5 – Installing the fuel pump assembly.
A – Remembering back to the beginning when you removed the assembly from the car, replace it in the same fashion. You must be careful of the float assembly. You may once again need to twist the whole assembly to get it back into the car.
B – There are three rubber nipples on the gasket. Ensure they are protruding through their respective holes on the lid of the pump assembly.
C – Replace the nuts that secure the pump assembly to the chassis. They should be just over hand tight.
D – Reconnect fuel pressure lines, electrical connector and fuel hose. Remember that the fuel hose has a hose clamp that will need to be put back on.

E – Close your gas cap, connect your batteries negative cable and double check all connections. Put the key in the car and place it to the ON position to prime the fuel pump. Check for leaks.
F – With no fuel leaks, start the car. Let it idle for a few minutes so that the new filter will be saturated before driving.
G – Test drive.
H – Replace the fuel pump assembly cover using the Phillips head screwdriver and 4 screws. It would be a good time to clean the foam gasket that goes between the cover and the trunk floor.
6 – Replacing the interior
A – This will be the opposite of step 2.
7 – Fuel filter dissection.
A – Give the old filter a good twist to break apart the plastic top from its metal base. Pull the pieces apart to expose the old filter element. The element started life white in color.

References
http://www.iwsti.com/forums/how-install/166487-gd-fuel-filter-replacement.html