I also advocate going the AMD route, not because I think that there is anything wrong with your upgrade idea, but because I sense that you are on a budget and I think that AMD's platform offers you a better alternative for the price.
My advice is to drop the idea of something like an i5 8400 level of performance. Instead, just focus on getting onto the AM4 platform, that has long term support built in. You can't say that at all about Intel's platform.
Get a Ryzen 3 2200G, a B350 motherboard, and 8 GB of DDR4. That will save you some money, and give you a good performance boost over what you have, but more importantly it gets you onto AM4, which means that you can upgrade, at any time between now and 2020, to a much faster Ryzen 5 or Ryzen 7 processor. You can get on the AM4 platform for $250-300, get better performance than your FX, and have a clear upgrade path.
Upgrading is expensive right now thanks to RAM prices, so if the i5 approach is out of your price range, you'll be better served going with a lower spec CPU. ANYTHING new that is on the market is faster than your FX CPU. You could apply my idea with an i3, but you might be restricted to just this generation of Intel's Core CPUs, so upgrading is more of a pain later.
Hope that helps.