Above all else, when looking at an engine replacement of any kind, KNOW WHAT YOU HAVE FIRST.
If you are looking to upgrade your car with an engine swap (IE RS to WRX), this is not the post you are looking for, but lucky for you, we have posts that are - Best Engine Swap for Your Chassis and What To Know Before Swapping.
We get this question a lot, and while we are happy to wire up any car, sometimes it's simpler and cheaper to find something compatible with your current ECU and harness. Subaru makes excellent engines but eventually, with wear and tear (that or too much boost!), they fail like any other engine. This post discusses the easiest way to replace your engine and get your Subaru back on the road. We always recommend you talk about this with your local engine builder because pulling something used out for something else used is not always the best option, and many times it's not as expensive as you might think.
iWire's recommendation, anytime it's a matter of basic replacement (not upgrading), is to keep the ECU and wiring the same and replace the long block. This isn't always as easy as it seems since not all EJs are created equal.
To make sure this happens for a NA car, find a NA long block from the same family to replace it. For turbo models, you can find a compatible turbo long block of the same type. Once a compatible long block is found, all that's left is to put the old harness and intake manifold on the new long block. We recommend this because otherwise, it will require a harness merge like when doing an RS to WRX swap, aka an upgrade. Given the result will be the same as the start point, there is no reason to spend the time and money to go through the process of a harness merge for any basic engine replacement.
What to look for in a replacement long block?
Ensure the new long block has the same features as the old engine.
AVCS or Non-AVCS
Drive by Wire or Drive by Cable
2-wire camshaft position sensors or 3-wire camshaft position sensors - more about that here
ECU type -16 bit or 32 bit
EJ Series Engine Families
32-Bit ECU with Intake AVCS Models - All of the following turbo cars could use the same long block interchangeably for repair because they are intake-only AVCS, drive-by-wire models, and utilize 3-wire cam position sensors. We generally do not recommend using dual AVCS engines in single AVCS applications.
2004+ Legacy GT
2004+ Forester XT
2004-2006 JDM Forester STi
Please be aware of the secondary air injection system. For models that have it, it would be wise to find a long block that also has it for smog purposes.
Engines without secondary air and are 32-bit platforms
2004-2005 Forester XT
2005-2006 Legacy GT
2004-2006 Baja Turbo
32 Bit ECU with Intake and Exhaust AVCS Models
2008+ USDM STi
2008+ JDM STi (V10+)
16 Bit ECU - USDM WRX models can be interchanged easily with the JDM AVCS models by adding in the AVCS wiring
2002-2005 USDM WRX
2001-2006 JDM WRX
2001-2006 JDM STi
For non-turbo engines, it would be best to stick to an engine with similar features. For example, a 2000 Impreza engine would not be good in a 95 chassis because phase 2 engines are incompatible with phase 1 wiring. Another scenario would be that a 2007 NA engine in a 2005 RS would create an issue because the 2005 RS ECU cannot control the AVLS on the 2007 engine.
Phase 1 - 1998 and older
Phase 2 without AVLS - 1999-2005
Phase 2 with AVLS and 2-wire Camshaft position sensor
2006-2011 Impreza and Legacy
2006-2010 for Forester
2012+ non turbo Legacy, Impreza, and Crosstrek
2011+ non turbo Forester
16 Bit to 32 Bit Swap - More detail about this can be found here
One common exception would be going from a 16-bit ECU to a 32-bit ECU (02 WRX chassis to 06 STi engine), but we would consider this more of a swap/upgrade because of the increased capabilities of the 32-bit ECUs. We recommend this route for certain customers, but doing a similar 16 16-bit swap from a JDM WRX or STi will be cheaper and more straightforward.