0

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?

  • I'm a bit confused... are you asking if you can have the live site at domain.com and the in-development site at www.domain.com? Or do you want the live site to live at both of those domains and have the development site live at something like dev.domain.com? Regardless, is anything stopping you from just developing locally first and deploying to live when you're ready? – Brad Bell Aug 6 '15 at 5:38
  • I was wondering if I could just rename index.php to home.php or something like that and do it all in one domain. But it seems like a sub-domain makes more sense. I'd do it locally but I need the client to be able to easily see what's going on. Thank you so much for responding. any futrher advice would be greatly appreciated. – Heyward Aug 7 '15 at 0:06
2

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? – Heyward Aug 7 '15 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. – Matt Wilcox Aug 10 '15 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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