The TP-Link TL-WR740N router use in this tutorial is Ver 4.22. Make sure you download the correct version of firmware. Flashing wrong version firmware will brick the router.
Here is the link. You must download both factory-to-ddwrt.bin & tl-wr740nv4-webflash.bin.
You must upgrade to factory-to-ddwrt.bin before you flash tl-wr740nv4-webflash.bin.
1. Enter 192.168.1.1 from IE to login to the router. Select System Tools then click on Firmware Upgrade.
2. Choose factory-to-ddwrt.bin which you download to your computer previously.
3. Click Upgrade button to start firmware upgrading.
4. The router will restart automatically after completed upgrade.
Screen shot for upgrade firmware: http://www.divshare.com/download/18183284-fed
5. Login to router again. Now DD-WRT prompt you for changing user name & password.
6. Enter the new router user name & password then click on Change Password button.
7. Enter new user name & password to login to the router.
8. Click on Administration from DD-WRT menu then select Firmware Upgrade.
9. Choose tl-wr740nv4-webflash.bin & click on Upgrade button
The router will upgrade to DD-WRT dated 03-19-12-r18777 which is much more powerful than before.