When your website gets hacked it is usually a terrible feeling. You feel bad because the site got violated and most because you will have a ton of work ahead of you. Websites get hacked for a variety of reasons most notably being for fun and recognition of the hacker. Popular website platforms are targeted for hacking like WordPress and Joomla, blog and CMS.
One of the first things you should do for your site is to have daily server side backups that you download on a daily basis to your hard drive. Keep your security up to date on your work station. Make sure that you have more than one administrator account on your website in the event the website is hacked you can use the alternate administrator to make changes. Keep a record of all the software you install in your website so that you can identify the exploit that the hackers used to hack your website. Use website tools that will block out known spam IP addresses. This will help you a great deal as certain places originate much more hackers than other places.