If your website is hacked, take immediate action to restore your website from a backup, change all passwords, and contact your web hosting provider or security experts for assistance. It is also important to identify the cause of the breach and take steps to prevent future incidents.