Before considering that, consider that once you change the hardware, your HP OEM Licenced copy of Windows is NULL AND VOID. Windows will refuse to load, won't "repair", nor reinstall, because that isn't the computer HP sold you. You will be required to BUY a brand new copy of Windows (at this time only Windows 10 is sold) from the store and WIPE your hard drive clean then do a clean install (advisable anyway when making such massive changes).
Further you would have to check the new boards, if any would take your current CPU, never mind if that HP Power Supply can even support it. Realistically OEM Desktop computers are made to ONLY upgrade low power / low cost peripherals (Sound card, NIC, GPU - LOW POWER!) because they make the...