Give them scratching pads or posts. They need to be trained. Yes, it can be done! I rescued 6 feral cats, and they all learned, just need a boatload of patience.
Here is a spray that should help: https://pets.thenest.com/stop-cats-scratching-furniture-home-remedy-spray-7710.html
I've never made my own, but have used Nature's Miracle with great success.