I'd say it depends a bit on why you want to upgrade and how much you ride.
If you have put 20,000 miles on your old bike and half the drivetrain needs to be swapped out because you've worn it to bits, then it's worthwhile to pick up a new bike and use the old one as a backup / beater bike.
If you only put 2,000 miles on your old bike in the past 5 or so years, well, it's probably not worth upgrading in the first place.
You might also want to get a full overhaul for your bike, and if you've put ~5000 miles on it, replace some of the worn parts. It won't be cheap, but it'll be a fraction the cost of buying a new bike. If the mechanic does a good job it will probably ride like when it was brand new.