Jump to:

325 Posts in 200 Topics by 157 members

Migrating a Site to Silverstripe

SilverStripe Forums » Migrating a Site to Silverstripe » Migrating a SilverStripe site to another server

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

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

Page: 1 2
Go to End
Author Topic: 8763 Views
  • Netmaster
    Avatar
    Community Member
    2 Posts

    Migrating a SilverStripe site to another server Link to this post

    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.)

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

    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 /".

  • BuddhaSource
    Avatar
    Community Member
    57 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

    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

  • Mo
    Avatar
    Community Member
    505 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

    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

  • Mo
    Avatar
    Community Member
    505 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

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

    Mo

  • joshy
    Avatar
    Community Member
    57 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

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

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

    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

  • Mo
    Avatar
    Community Member
    505 Posts

    Re: Migrating a SilverStripe site to another server Link to this post

    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

    8763 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.