I would like to install Drupal for test purposes on my web server.
But I don't want to replace all my current web pages.
Instead Drupal should run independently in parallel in a sub directory of the
html base directory.

Say my web server is currently responsible for the domain

http://www.aaaaa.com

where the html base directory is in the physical directory

/user/local/home/myname/html/

Now I want to install Drupal in

/user/local/home/myname/html/testdru/

and the entry web page for my Drupal section/installation should be

http://www.aaaaa.com/testdru/index.html

Is this possible?

Again: I want the Drupal installation completely independent from
the primary web server stuff. The old, original web pages should
be accessible as before.

Shitty Joomla for example requires always to be installed in the base directory.

Peter

Comments

scoutbaker’s picture

Drupal can be installed in a subdirectory. Just upload the files to the correct place and perform the installation as normal.

P.S. There's will not be an index.html file. It would be index.php.

ddorian’s picture

Shitty Joomla for example requires always to be installed in the base directory.

that is not true. i HAVE installed it in a subfolder

dman’s picture

Drupal will happily live in a subdirectory, and not interfere with anything.

but

It's not happy about being moved out of that subdirectory unless all you are doing is core-generated menu links etc. File uploads are (still) remembered as being stored in their own full paths. Which leads to (easily fixed) breakages down the path with embedded images or links embedded in content if you move, rename or promote that test subdir later on.

What this means is you should not develop in a subdir called testdru.
Name it {subsection} the way it is always to be named. If needed, do so on a test site on another virtual hostname or another http port to get the same document_root position, but do not bank on being able to move a whole site around arbitrarily if it's been built in a funny subfolder.

There are some sane post-hoc fixes, but they require a few (sorta-OK-documented) database queries to do some bulk path renaming for you.
see also pathologic.module which I think assists repairing in-page links.

cayenne’s picture

Yes!

I have done this with several sites. No problem at all, though, as noted by the post above, you may need to keep an eye on your paths. Sometimes it is necessary to set the path in the settings.php file.

If you migrate the site from the subdirectory to the root, there will be some confusion, but fixable.

Fear not. stride bravely.

:)

pstein’s picture

Ok. Thank you.

But an additional question about the backup: Assume I have installed DruPal in a sub-directory
and applied some modifications/upload some stuff.

Later I want to backup Drupal (CMS + my content):
Are really ALL (!) files put in the directory tree starting with the drupal install directory?
Or does DruPal write (later after installation) some config/log/library files into dirs OUTSIDE ?