Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Migrating a Site to Silverstripe /

What you need to know when migrating your existing site to SilverStripe.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Migrating a SilverStripe site to another server


Go to End
Reply


13 Posts   9410 Views

Avatar
Netmaster

Community Member, 2 Posts

24 January 2009 at 1:47pm

Edited: 24/01/2009 1:50pm

I do a lot of WWW testing on a test platform before releasing onto a production server and I'm liking what I see thus far with SilverStripe. However, there doesn't appear to be a tool for migrating a site's content between hardware. Would it be fair to assume that these are the steps that need to be taken?

(Please assume that the target (production) server doesn't have SilverStripe installed yet)

  • Ensure target server has the same : MySQL database and user accounts as test server
  • Export the test server's database and import into target server
  • Copy contents of SilverStripe file system to target server

How far off am I?

(PS Formatting Help stats the use of "[ * ]" for bullets in a list, it doesn't work.)

Avatar
ajshort

Community Member, 244 Posts

24 January 2009 at 4:36pm

You almost got it right - what you need to do is migrate your DB to the new server. Then you can update mysite/_config.php (or _ss_environment.php if your using one) with your new connection details. Then just copy all your site files over to your new server.

One extra change you may have to make is if you developed your site in a subdirectory your .htaccess file will have a like like "RequireBase /subdomain/" in it. If you then wish to run this site as the root of a domain name you need to change it to "RewriteBase /".

Avatar
BuddhaSource

Community Member, 57 Posts

17 February 2009 at 7:00pm

Edited: 17/02/2009 7:03pm

Hi,

I am having SQL connection issues may be.

I have setup 2.3 RC3 on my local appach then moved eveything to DreamHost uploaded my local db and copy pasted the files.
Basically followed thats discribed above including .htaccess modification.

[User Error] Couldn't run query: SELECT `SiteTree`.*, `Page`.*, `GhostPage`.*, `BlogEntry`.*, `BlogHolder`.*, `GalleryPage`.*, `Products`.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `UserDefinedForm`.*, `SiteTree`.ID, if(`SiteTree`.ClassName,`SiteTree`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree` LEFT JOIN `Page` ON `Page`.ID = `SiteTree`.ID LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree`.ID LEFT JOIN `BlogEntry` ON `BlogEntry`.ID = `SiteTree`.ID LEFT JOIN `BlogHolder` ON `BlogHolder`.ID = `SiteTree`.ID LEFT JOIN `GalleryPage` ON `GalleryPage`.ID = `SiteTree`.ID LEFT JOIN `Products` ON `Products`.ID = `SiteTree`.ID LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree`.ID LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree`.ID LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree`.ID LEFT JOIN `UserDefinedForm` ON `UserDefinedForm`.ID = `SiteTree`.ID WHERE (HomepageForDomain REGEXP '(, ^) *prosafe\.projects\.MYWEBSITE\.in *(,|$)') ORDER BY Sort LIMIT 1 | Table 'prosafe_db.SiteTree' doesn't exist

Avatar
Mo

Community Member, 514 Posts

11 April 2009 at 10:19am

Are you transfering from a Windows environment to a Linux one? Mysql in Windows is case insensitive it seems, and so saves all table names as lowercase, but Linux isn't!

I am going to have to rename about 40 tables in my SQL file because of this.

Mo

Avatar
Mo

Community Member, 514 Posts

11 April 2009 at 10:34am

In relation to that point, is it possible to force silverstripe to create tables using the correct casing when running dev/builld?

Mo

Avatar
joshy

Community Member, 57 Posts

27 April 2009 at 12:22am

This has probably got to you too late, but see: http://open.silverstripe.com/ticket/2476 for a solution to renaming all the tables!

Avatar
Double-A-Ron

Community Member, 604 Posts

30 April 2009 at 10:49pm

Mo are you using Wamp?

Check out this doc: http://doc.silverstripe.org/doku.php?id=installation-on-windows-wamp

See step 7:

Left-click the gauge, then select MySQL → my.ini. At the very bottom of the file, and add the following to a new line (without the quotes): “lower_case_table_names = 2”. Save the file, close Notepad and left-click the gauge, and selected ‘Restart all services’. This is used to ease the transition between a Windows-based install and a Linux-based install where case-sensitivity is important.

Cheers
Aaron

Avatar
Mo

Community Member, 514 Posts

2 May 2009 at 1:38am

Darkmonkey, Yes you were too late, and yes that would have been very useful!

I am going to bookmark this for future reference, roll on 2.4! :)

Aron, I am using IIS 6.0 in my development environment, not wamp. This will be changing soon, unfortunately not soon enough!

Mo

Go to Top