I'm gungho to get started building in Craft but I don't want the complications of moving the site over from a development directory. Is there a way to easily do this while the current site is up and running?
1 Answer
In general, developing a website on the live server is a risky thing. Should something go wrong while you're developing then you risk the live website. It's unlikely, but an accidental upload to the wrong folder, or a wonky SQL statement, or anything like that can happen.
If you must run the site on the live server though, your best bet is to set up a sub-domain such as beta.mywebsite.com. Host that on your live server and do all the development there. Then, when it's time to retire the old site and make the new one 'live', you can move the files across from the beta directory to the www one.
I wouldn't recommend doing that though. Much less risky to get your local machine set up as a development server, do it all on that, and then put the site live.
-
Thanks so much Matt. I'd like the client to be able to see what's going on though. So I'm thinking I should back up the live site and then set up a sub-domain. Does Craft transfer over well just by moving the files? I should upload craft and go through the installation process in the live domain before moving the files over I imagine?– HeywardAug 7, 2015 at 0:03
-
If you're going to be doing this sort of thing regularly it sounds like what you really could do with is a staging server - a cheap linode or something would do. It's just somewhere to show clients work, and maybe have them do data entry, which isn't your local machine and isn't a live server. Backing up is always a good idea. Moving Craft from a sub-domain to the main domain ought to be no more than moving the files across, and perhaps changing a path in the config.php file. You shouldn't need to re-install anything if you're just moving from a sub domain to the main one. Aug 10, 2015 at 11:43
domain.com
and the in-development site atwww.domain.com
? Or do you want the live site to live at both of those domains and have the development site live at something likedev.domain.com
? Regardless, is anything stopping you from just developing locally first and deploying to live when you're ready?