By ratnesh aarohi on
Hi
Since my root directory already had my existing html (non drupal) website
i installed drupal in a /domain/xyz directory and have now configured it.
since it was in /xyz directory it was being viwed by public
Now i want to shift the drupal installation to the root directory of the domain - to which the domain name points - (after removing my static html website)
how do i do the shift of drupal - can i just copy the whole installation into the root - will that work?
or do i need to change something else.
thanks in advance
ratnesh
Comments
I did similar recently. I
I did similar recently. I kept my existing static site in the (Apache) document root and built the replacement (Drupal) site in a staging subdirectory. When I was ready to go live with the new site I just moved the contents of the subdirectory into the root (after making a backup archive of everything, of course).
Links that are managed within Drupal move gracefully; they are relative to the Drupal root. The only concern is for links where you have hard-coded a path which includes the name of your staging subdirectory or one which contains a leading slash. Look particularly at your template files, css and the content of any pages you have created.
The developer who largely built my site anticipated the change in file hierarchy, and made regular use of
print base_path()andprint base_path() . path_to_theme()to avoid hard-coding paths.If you are concerned about either your old or new sites' URLs no longer working for search engines and past visitors, you may want to employ server redirects to map the old URL to the new. This can be done with Apache redirects (typically in your .htaccess file) or through the Drupal core-optional "Path" module.
thanks
thanks themphill
you have very comprehensively answered my query and allayed my concerns
ratnesh