Forums / Developer / Multisite Move from one server to other

Multisite Move from one server to other

Author Message

Sunil Mulay

Monday 15 March 2010 4:00:46 am

Hello Friends,
I have created a new multiple site using EZ publish 4.2.0
my site structure is something similar to
first site
design/Site1
extension/site1ext
siteaccess/plain_site
siteaccess/plain_site_admin
Database : site1db
second site
design/Site2
extension/site2ext
siteaccess/new_plain_site
siteaccess/new_plain_site_admin
Database : site2db
now I wan't 2 move site Site1{plain_site} to another server.
I know how to move site but in case where there is only single site in an eZ installation there i used to move whole installation directory and db after clearing cache.
But i have no idea how to move single site from multiple sites... can any one help me in this please...please .....

Thank you,
Sunil.

Hakim Bouras

Monday 15 March 2010 6:47:44 am

Hi Sunil,

You can copy the whole ezp folder to your new server, and copy the database.

Then you will have to edit the file : site.ini.append.php in settings/override in order to specify which site you want to keep on each server. You should update the following lists of settings (by removing the option that belongs to a site that you do not want anymore).

[SiteSettings]
--> SiteList[]
[SiteAccessSettings]
--> AvailableSiteAccessList[]
--> HostMatchMapItems[]

You can clear your cache and then test to verify that everything is working fine.

Then, you can remove the files that are relative to a site that is not anymore on the server :

  • the files you have listed
  • the var/<siteN> files (depending if they are specific to your site - which you can see by looking your site.ini.append.php in settings/siteaccess/<siteN> )

Hope that help,

Hakim Bouras
PRISMALOG - Creation de site Internet

Sunil Mulay

Monday 15 March 2010 10:25:23 pm

HI Hakim Bouras,

Thanks for replying ....
I got what you said but, my problem is that i need to move 1 site from my server and ez installation to other server where there is eZ installed already and it already contains some ez sites.
In this case how should i proceed (is this possible .? ).can u please guide me in this ..?
Thank you,
Sunil Mulay

paul bolger

Monday 15 March 2010 11:16:29 pm

Sunil, It would depend on whether the sites on the new server are sharing the same database, and whether you want the site you are moving to have access to their data.

If not it's easy, just add and activate the siteaccess and restore its database to the local database server.

If you want to merge databases... I'm not sure. Maybe someone else might have some ideas. it's undoubtedly possible, although you would need to be careful (use a testing instance) and make sure both instances are running exactly the same version of eZ Publish.

Paul Bolger

Hakim Bouras

Tuesday 16 March 2010 1:17:53 am

Hi Sunil,

To move the Site2 to another server you will have to :

- copy the files to the new server (in the existing ez folder):

  • design/Site2
  • extension/site2ext
  • siteaccess/new_plain_site
  • siteaccess/new_plain_site_admin
  • var/Site2

- restore your database

- update your settings in settings/siteaccess/Site2/site.ini.append.php

  • database connection if it changes
  • var folder if it changes

- verify the other extensions that was used, in the previous server and make sure they are available on the new server (if they are used by your site)

  • globally in the ez installation in settings/override/site.ini.append.php
  • locally, only for Site 2 in settings/siteaccess/Site2/site.ini.append.php

- declare Site 2 in your new server by updating settings/override/site.ini.append.php

[SiteSettings]
--> SiteList[]
[SiteAccessSettings]
--> AvailableSiteAccessList[]
--> HostMatchMapItems[]

- clear the cache folder var/Site2/cache

Hopefully, it should work after that.

Hakim

Sunil Mulay

Tuesday 16 March 2010 2:00:21 am

HI Friends

I tried this and succeed in doing this. .:) :)

all thanks to u guys..
Hakim u have explained this in the best way any one can explain .
will let you know if i face any further problem...

Thank you,
Sunil