In my local MAMP environment, sometimes Reference sites timeout during installation, despite having PHP and Apache configured with very high timeout settings. The trick is to activate Xdebug in MAMP’s PHP settings. Not sure why this works, but it has bitten me more than once and this trick solves it.