VarunKrish

Lesson Learnt – Never ever change change files on a live site without testing

Recently I was playing with the Linux command line and I was testing out a script which I was interested in.

I ran a wget command and download the file to the server and then extracted it using unzip

But the worst part is that the after the extraction I ran a mv command to move the files to root directory

And the command replaced the sites’ index.php .htaccess and robots.txt

I did not bother for a couple of days until I figure out that the site is not working as the main index file is broken and also google and other search engines started deindexing the site as the URLs were broken and worst part is that robots.txt had a Dissallow * line

Its a Very painful mistake both for me and the site ..

So the lesson learnt is that Never try out new things / change files on a live site without prior testing even if your confident enough ..

Such mistakes can cause irreversible damage to the site and might take days / month to discover ( glad I found in 2 days )

So having a Local , Dev or Staging environment .. even on same server or machine would make a HUGE difference in such calamities

Daily backups were disabled for this site as its small one .. and the weekly backup was taking ages to extract

Only the host Servint saved us from this disaster .. they restored the files needed from a recent backup and we were back on track.

We had about 10hrs of downtime due to this negligence .. Unforgivable !

Exit mobile version