OptiFine for Minecraft 1.8.9: M5 release, M6 preview and older 1.8 builds
Download M5 for Minecraft 1.8.9. Use M6 pre2 for its macOS or player-item fix. Both list Forge 11.15.1.1902.

For Minecraft: Java Edition 1.8.9, download OptiFine M5, the release build. Choose the M6 pre2 preview if you need its fix for a macOS crash with newer JDKs or for items showing on invisible players. OptiFine lists Forge #1902 for both files. The full Forge build number is 11.15.1.1902.
Read the whole filename
On the official OptiFine downloads page, click Show all versions and find Minecraft 1.8.9. Use the M5 row for the release. Expand + Preview versions to see M6 pre2 above pre1.

Choose (Mirror) on the row you want. It opens the official page for that build. Check the build name above Download, click the button and read the filename before opening the file.

- M5 release
OptiFine_1.8.9_HD_U_M5.jar - M6 pre2 preview
preview_OptiFine_1.8.9_HD_U_M6_pre2.jar
Search results can land on the official page for the older L5 release or the earlier M6 pre1 preview. If you want M5 or M6 pre2, return to the exact 1.8.9 section and use the corresponding row.
M6 pre2 fixes
The M6 pre2 changelog lists a fix for player items such as the Santa hat appearing on invisible players. M6 pre2 also carries the macOS crash fix documented in pre1. For a 1.8.9 setup that doesn't need either fix, I'd start with M5.
Settle Forge before adding the JAR
On the Forge downloads page for Minecraft 1.8.9, expand Show all Versions and look for 11.15.1.1902. Forge's own Latest and Recommended panels both point to 11.15.1.2318. If a working modpack already pins 2318 or another build, keep it on that version and use a separate 1.8.9 instance to try the pairing OptiFine lists.

With Forge in Minecraft Launcher, put the intact OptiFine JAR in the mods folder of the selected 1.8.9 installation and start that Forge profile. The Forge installation instructions use that installation's game directory.
Already using the matching Forge instance in Prism Launcher? In that instance, choose Edit > Mods > Add file and select the intact M5 or M6 pre2 JAR. These are the controls for adding OptiFine as a mod in Prism. Start the instance you changed.
Using the official launcher without Forge? Start plain Minecraft 1.8.9 once and quit. Open the matching OptiFine JAR with Java and click Install. The standalone installation steps show how to select the resulting OptiFine profile in Minecraft Launcher and press Play.
1.8.8 and 1.8.0 have their own I7 files
For Minecraft 1.8.8, choose OptiFine_1.8.8_HD_U_I7.jar, listed with Forge #1655. For Minecraft 1.8.0, use OptiFine_1.8.0_HD_U_I7.jar, listed with Forge #1577. Match the Minecraft number in the filename as well as the I7 suffix.
For a pack pinned specifically to Minecraft 1.7.10, use the OptiFine build for 1.7.10. If your launcher shows another version, match its exact row in the OptiFine catalog before opening a JAR.


