hi, i'm working with a drupal 6 installation for human customers, economically. I was wondering if it's possible to create a parallel site, that has almost the same code, but works for companies. is it possible to install such a thing on my server?

Comments

stephenrobinson’s picture

e.g foorbar1.org, goobar2.org
add 2 settings files in site specific folders with different database names, remove from all and default, e.g.

/www/htdocs/sites/foorbar1.org/settings.php
/www/htdocs/sites/foorbar1.org/files/
/www/htdocs/sites/foorbar1.org/themes/foorbar1theme/

/www/htdocs/sites/foorbar2.org/settings.php
/www/htdocs/sites/foorbar2.org/files/
/www/htdocs/sites/foorbar2.org/themes/foorbar2theme/

make 2 themes job done.

stokks’s picture

ok but what shall i do with the database? is it the same concept as a drupal multisite? because i've seen in the community something called like that, but i'm not sure of the result.

and then, what should it be the settings.php, only changing the database it is referred to?

stephenrobinson’s picture

just change the database name.

stokks’s picture

and then? i'm sorry i'm quite new with this stuff of duplicating a website... can you please give a little more help? like, do you know where i can find a tutorial for something like this?

stokks’s picture

still waiting for someone to help me with this... anyone?

parenthesis’s picture

Why not use backup and migrate to export the SQL database, install another drupal instance in a new database, copy in the themes, modules and libraries folders etc, then import the old SQL database into the same site.

I know it's not exactly what you were after, but you should be able to effectively duplicate your site in around 15 minuets, then you'd simply need to change what you need.

stokks’s picture

ah, so the backup and migrate module only moves the database?

i'm working on an apache 2.2.15 win32 server, but i don't know in which way i should put the folders...

i tried to copy all the files in htdocs into htdocs/personal, inserted a simple index.html file, but then i get a page with the 404 not found error...

did i miss something?

parenthesis’s picture

You should really only be copying certain folders, but do it after you have installed a new instance of drupal, you'd want to create a new database first with phpMyAdmin (or whatever tool you prefer) and then extract the drupal archive into that htdocs/personal folder, then navigate in a browser to http://localhost/personal and you should be greeted with the drupal installer.

from my limited experience rebuilding sites the folders i'd be concerned about are:

/themes
/sites/all/libraries
/sites/all/modules
/modules
/sites/default/files

You would simply want to copy and overwrite all of these folders from your old directory to the new one, then you should see all of your themes and modules as being installed, you can then import the MySQL database and it should enable all your mods/themes and re-create all of the content on the site.

stokks’s picture

i forgot an important thing, there is a netbeans project associated to my website, will it work automatically on the new one, or do i have to make some backup/restore stuff?

however, this is my plan, if anybody could tell me if that works:

- make a dump of the database (will it dump only the database?) with backup and migrate module

- copy a new installation (drupal 6.17) into the htdocs folder

- copy the same modules of the original website to htdocs/drupal6.17/all/modules (with backup and migrate too)
and the theme to htdocs/drupal6.17/all/themes

- restore with backup and migrate

is it right?

parenthesis’s picture

You can work live with Netbeans by creating a new project, in those settings somewhere you should see an option to create a new remote/ftp project (I think you can use SFTP too, but I haven't tried it), then you can (probably) copy & replace your old project files and rename them.

As far as I know Backup and Migrate only backs up the database.

Yes, copy a new install

You probably want sites/all/libraries too and sites/all/modules too, a lot of modules install/require libraries that can be found in that directory, for some reason I've also found that modules can actually be installed in one of two places, in the sites/all/modules folder and in modules/

And then Backup and Migrate should work pretty easily. You'd just have to delete the no longer relevant data through admin/content in drupal.

stokks’s picture

but what should it be? how can i recognize the existing project? will it create problems with the working one? because when i click on new project, it asks me whether to ser it as "main project"... what would that mean?

can someone please tell me where i could find a good tutorial for this?