Did you know most hosting companies do not take backups of your website? What will you do if your site is hacked?

  • I will redirect all pages to an "under constructions" page, then try to recover and and check the web site – Zeal Lin Jun 29 '15 at 9:15
  • 1
    Welcome to Freelancing! This question has potential to be pretty good, but needs far more expansion and needs some relation to freelancing in there. Please edit your question and add something (even an analogy) to expand it a little more! – Amelia Jun 29 '15 at 12:30
  • There is no universal way of hacking into website, therefore, there is no universal way of how I would behave if my website gets hacked. Please edit your question and make it a bit more specific. – r3bl Jul 4 '15 at 14:36

I've actually had this happen before with a personal site.

My host was nice enough to actually give me a chance to get my data off the site, before I wiped it

The very first thing they did was cut off access from the server out, so it wouldn't affect anyone else. Pretty good idea.

If you're lucky, you might have a host like mine, and actually be able to get your data out. If not... you're out of luck

I did have a backup plan, and I did put it into effect.

Lesson 0: Backups are like shoelaces. Left undone, you will trip and break your face, and its too important to leave to other people. I managed to recover the site from my last known good backups, so all was good.

Lesson 0.0: Build your site with security in mind to start with

Lesson 1: If you can, keep a copy of the site contents for threat analysis. In my case, someone brute forced my root password

Lesson 2: Learn from lesson 1. When you rebuild your site, make sure you don't make the same mistakes again. My new server has key based auth, I considered building it without a root account.

I'd also add, shared hosting can be a pain, and I tend to run a VPS or a dedicated server these days.

Not the answer you're looking for? Browse other questions tagged or ask your own question.