I am trying to build a website from scratch, and I am pretty new to this. I was wondering how I can keep a stable version published while I am further developing.
I was thinking of having two folders on my server /Dev and /Stable and then setting the Directory Index in the .htaccess file to point to the Stable version.
Is this an effective way of doing this?
The best practice for this task it to use different domains for this, as Pekka points out. You could have http://www.website.com for the usually so called “live” version and e.g. test.website.com or dev.website.com or staging.website.com – with password protection – for development.
But that might be a monetary issue, so one thing you can (and maybe should) always do is to run the complete website as a local version on your computer – e.g. using XAMPP in case you’re not fluent with sql / web / ftp / mail server setup.
In any case it’s a great personal skill improvement if you learn how to setup and run more or less the same environment your website is running under on your local machine!
Furthermore you might want to start using a versioning software like e.g. Subversion or even more sophisticated git. That way you can further enhance/develop your code and nevertheless do hotfixes on your running version without having to maintain 2 different file trees.