Hey Syl...
From my experience, this isn't a good idea. The easiest reason to point out is your relative links (which are good to use, but will get screwed up here).
For example, if you want to put an item on your main menu for contact, it should be linked to the path /contact (you shouldn't link to www.example.com/contact in case you ever change your domain name or make any other big changes). Now, if you were building at: example.com/projects then the link referance /contact wouldn't work...but you'd want it to work in your final site. This is just one reason building in folders is a bad idea in general (not just with drupal).
The solution? Build in a subdomain. Instead of building your site at www.example.com/projects, build it at projects.example.com. Then, you're staying at a root level with your installation, and all your relative links will continue to work once you move it over to the live site.
Hopefully this helps!
-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com
I have the same issues. The hosting company were with doesnt offer subdomain access. Sounds like were just going to spend a few hours doing some re-adjustments with links when were ready to go live. We talked about this a bit at this post
http://www.geeksandgod.com/episode32
I'm using URLs like http://www.site.com/new_site for development and then when they are ready for production I move them to http://www.site.com. Just follow the changes in this document:
If you have setup clean urls, then you also have to change the .htaccess file. The change I make is:
RewriteBase /new_site
to
RewriteBase /
One other thing to watch when developing the theme is to use all relative paths when linking to images and other files.
Rick Russell
Sugar Creek Baptist Church
http://www.sugarcreek.net
If you code everything correctly this shouldn't be that big of a deal though there are a couple of things.
Rick is right on these things but when you are developing your theme think about location. Use functions like path_to_theme and base_path to tell drupal where the images are at. This will make moving the site a lot easier because drupal will know it's path so it can fill in the part that changed.
But, this doesn't apply to images you display in the body of a node. Or, any text area for that matter. For this there are three ways to handle this. First, for things you have images on that you want to view in a special way, like how we display an image for each podcast, use CCK and add a field. With this you can choose how to display it and the path. Second, and most common way to deal with these images is to go in and manually change them. This doesn't just apply to images but to links or anything linked in as well. The final way is to create a smart database find and replace query. This is for advanced users and if you are capable you will know how to do it.
In any case there is a level of work associated with it and it's not a simple directly move.
Matt Farina
Geeks and God Co-Host
www.mattfarina.com
base_path and path_to_theme won't work in text areas because of filtering. There are input filters and unless you turn it on PHP code is filtered out. This is for security and it is only offered for admins who know who to use it. So, the functions base_path and path_to_theme won't work in text areas. For security it would be a very very very bad idea to allow that.
CCK is a drupal module.(http://drupal.org/project/cck) You may want to check out our past few episodes where we talked about CCK and definitely look at what it does over on the drupal website. The fields it offers can be themed however you want using the contemplate module, some advanced theming in the template.php file or in several others ways. In general it gives you a lot more control over presentation.
Matt Farina
Geeks and God Co-Host
www.mattfarina.com
I've installed drupal and all the modules required for podcasting, and now I'm ready to start theming and migrating data, BUT I'm doing it on a sub-domain (as you've recommended).
Now, my question is how do I relocate it once I'm done?
Do I just copy all of the files into the primary folder on my host? Do I need to adjust some variables somewhere to tell drupal I'm no longer at new.geekons.com but am now simply at www.geekons.com?
(Please don't look, it is hideous so far!)
I just want to pre-plan before investing time in doing things the wrong way.
Glad to see you here and trying out drupal. I've listened to your podcast many times before. Really enjoy it. Hope to see hear some more episodes when you get around to it. Over a drupal there has been a topic about this.
I had my drupal site originally at www.bteministries.org/cms and moved it to just www.bteministries.org the other day. Its a pretty basic drupal site, being my first drupal site. A newbie to doing websites.
My move went super easy. I just had to move all the files to root and and change some urls to reflect the change. That was it really. Wouldn't even have to do that I dont think If I originally used a subdomain as yourself in the first place.
If you've set things up the way I usually recommend, the move from a subdomain to a live domain is even MUCH simpler than techmate suggests.
Simply rename the subdomain folder to the main domain folder, after naming the main domain folder to something else. That's it. Your site will go live. (for example: we built the new geeksandgod.com site at: beta.geeksandgod.com. When we were ready to launch, we simple named our old site folder: old.geeksandgod.com and renamed beta.geeksandgod.com to: geeksandgod.com. Then we were instantly live)
Now, this is assuming that you have setup your domain and subdomains properly in the first place (which you obviously did) and you didn't change or use the base_url setting in the /sites/default/settings.php file. If you changed this, you'll have to do all updates that using this requires (which is usually just changing the base url to the live url)
This is also assuming you've used only relative URLS in your sitebuild...which is always a good practice. If you didn't you'll have to find and change all those as well.
But, if you setup your domains properly, didn't use the base_url setting, and used all relative urls: Just change the name of the server's folder, and you're live! It's just that simple.
-Rob Feature
Geeks and God Co-Host
www.bobchristenson.com
G'day folks,
I'm new to drupal. I've got a website I'm just starting to build. I've put drupal several directories down from the main site page, because my intention was to have a dev area, and move it all to the top of directory structure when we were ready. I'm not sure if I'm explaining this properly. Essentially, I've got drupal here:
www.mywebsite.com/projects/tools/cms/drupal
Eventually, I hope to have the resulting drupal site displayed here:
www.mywebsite.com
Will have trouble doing that ? Should I re-install drupal ?
Syl