Installing El Capitan on a new SSD

Solution 1:

If your HDD is still mounted you can download El Capitan from the Apple App Store and create a USB installer thumb drive:

  1. Download the OS X installer from the Mac App Store. Quit the installer if it opens automatically after downloading. The installer will be in your Applications folder.
  2. Mount your USB flash drive or other volume. You could also use a secondary internal partition. Partition the thumb drive with Disk Utility: one partition, Mac OS X Extended Journaled and GUID partition table and rename it (e.g. MyVolume).
  3. Open the Terminal app, which is in the Utilities folder of your Applications folder.
  4. Use the createinstallmedia command in Terminal to create the bootable installer. Examples of this command are in the next section. For detailed usage instructions, make sure that the appropriate Install OS X app is in your Applications folder, then enter one of the following paths in Terminal:

    #with MyVolume: the name of your USB thumb drive volume
    sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
    
  5. Shutdown your Mac and replace the hard drive.
  6. Boot your Mac - you may have to hold the alt/opt and choose the installer thumb drive as boot volume. Sometimes this doesn't work on the first attempt. Just reboot again!
  7. Partition the SSD with Disk Utility which is included in the installer thumb drive(AFAIR in the menubar -> Utilities): one partition, Mac OS X Extended Journaled and GUID partition table and rename it (e.g. Macintosh HD). Quit Disk Utility and install El Capitan.

If you already attached the SSD you can use Internet Recovery Mode (hold cmdR or altcmdR while booting) to first partition the new internal drive and then restore the original system (10.7 Lion). Then - after configuring Lion - you can to upgrade to El Capitan. This is not recommended because it takes at least twice the time/download.