How to install El Capitan on a brand new Hard Drive?
I have a MacBook Pro 13 inch (mid 2012 model). I was using Yosemite. All of a sudden the laptop got really slow and I thought I would upgrade the OS to El Capitan. But for some reason, the installation always used to get stuck in the gray screen saying "Installing: 31 minutes remaining". I didn't make a Time Machine backup :/ and I the MacBook doesn't boot up to the desktop, no matter what I do.
So, I took the MacBook to an Apple Store today. The person at the Genius Bar ran diagnostics to check if there's anything wrong with my Hard Drive. The test failed. He told me that I'd be needing a new Hard drive. He told me I could drop my MacBook at the Apple Store and that could replace the existing hard drive with a new one and it would cost me about $200. I don't want to pay so much money.
So, I thought I'd order a Western Digital Hard Drive 1TB 7200RPM from Amazon. But here's my question:
How do I install El Capitan on the new, installed WD 1TB Hard Drive for the MacBook?
Thank you in advance!
MacBook Pro (13-inch Mid 2012), OS X Yosemite (10.10.5)