Avoiding some common local dev accidents

Has this ever happened to you: you are editing the local version of your live site, make some changes, answer some emails, tweet, then you do some more changes and suddenly you realize you were editing the live version instead of the local version? Maybe it’s just me but here’s some things I do to make sure I don’t get fooled!

Backup, backup, backup…

Regularly… and BOTH your live site and your local dev site (ever made a local change and lost a bunch of works? Backups are not only for production stuff).

For me there’s only one name in that game: Akeeba Backup. It’s so easy to use you have NO reason not to (and I don’t get even get paid by the guy ;-)

Change admin template header

First thing I do when I install a local version of a site (most of the time with the excellent Akeeba backup) is to go into Extensions -> Templates -> Administrator options, select “Khepri” (the default Joomla admin template) and change the Header Color to “Cherry”. This gives me a big red (or should I say cherry) flag that screams “local”.

So I really don’t miss it, I even change the local site name  to some big letters & stars to catch my eye…


Beware of Virtuemart!

Virtuemart has a different config that stores the domain name.  If you only change your Joomla config file when you take your live site back on your localhost, at some point, when you do something Virtuemart related, you will end up on your live site… and you won’t even notice it. 2nd thing you should do when copying a live Virtuemart site to your local system is go into /administrator/components/com_virtuemart/virtuemart.cfg.php and change URL and SECUREURL (around like 34) to match your local dev path.

Use different browsers (or at least a different window)

This rule is a little hard to follow but if you always edit your live site in say Chrome and your local site in say Firefox, there is one less chance of accidentaly editing the wrong site.  If you only like one browser, then at least open a separate window for your local site vs. your live site because it’s very hard to tell which tab you are on.


Do you have some tricks you use? Feel free to share them in the comments!