Switching from Orchard.Web to Orchard.Source

Topics: General, Installing Orchard
Jul 1, 2011 at 10:33 PM

I find myself wanting to play around with creating modules with Orchard. I have VS2010 Pro on a Win 7 machine with IIS. I started with Orchard.Web. I spent a lot of time creating a bunch of customized themes (dealing with a few multi-tenant sites), but lately have been testing integrating some of my old MVC3 work into Orchard, and hence modifying some modules to take advantage of my other work (new modules were not necessary, since much of what I did in MVC3 fit into existing modules). Later, as I got more comfortable with the code (and started my love affair with Orchard), I started creating some basic modules.

I now realize I should have started with Orchard.Source. I am trying to see if I could save myself hours of work and "migrate" the Orchard.Web into Orchard.Source without having to re-create what I originally did. Save for some simple modifications, would it be feasible to just simply swap Orchard.Web into Orchard.Source? I would not just overwrite. I am thinking of literally deleting the Orchard.Source>Orchard.Web folder and swapping in the one I've been working with. Again, I realize this won't work off the bat and that I'll have to make some modifications - but saving myself hours of work means I get to enjoy the fireworks this weekend (and more beer). ;)

Cheers!

Coordinator
Jul 1, 2011 at 11:03 PM

Yes, great question, I might want to make a video about that.

Get the source release on a separate directory, and then copy your custom modules and themes into the relevant directories. If you have something in the media folder, you'll wnat to copy that as well. To migrate the data, well, it you are using SqlCe all you need is to copy the App_data folder over. If you are using Sql Server, well, all you need to do is also to copy the App_data folder over, as this contains the settings.txt file where the connection string is.

Let me know how that works (and happy fourth).

Jul 3, 2011 at 3:03 AM
Edited Jul 3, 2011 at 1:28 PM

The move appears to have been successful.  My default site has loaded up after swapping in some of the original Orchard.Web files that I started with into a downloaded Orchard.Source.  Very painless procedure.  Relatively quick.

I only copied over files that were necessary (in /Modules and /Themes) and just copied over the /App_Data folder in its entirety. Essentially, any files I modified.  If there are any changes I will post back here.

Some additional notes:

-I created some "Helper" classes for my original site (pre-Orchard) which I continued to use.  I just had to reference the .dll's again. This would apply to any .dll's you referenced into Orchard.

-I am running with Multi-Tenancy, and I continue to use WebMatrix/IIS to test the tenant websites on my local machine (see http://www.orchardproject.net/docs/Setting%20up%20a%20multi-tenant%20Orchard%20site.ashx#localhost).

-So far it looks like the modules I installed from the Orchard Gallery into my original Orchard.Web just work, rather than requiring me to re-install them through the Dashboard in the new site using Orchard.Source. This was my main concern as the amount of modules I installed/enabled took a while to install/set-up. Anything that saves time is a plus.

Jul 11, 2011 at 2:27 AM

Hello,

Thanks for this question. I wanted to solve this too and it was realy easy just copying appdata the modules and the media. Works great my site is running again in no time but now it is in my source great! Except for one thing I could not solve. I did copy the modules into the src/orchard.web/modules directory. But in my source code the modules are in that hidden folder but they don't show up under Modules in the solution. How to solve this? Should I add them one by one there?

Thx

Wim

Jul 11, 2011 at 2:46 AM

If you added new modules aside from what was copied, yes, you have to add them to the Modules folder in VS as a project. Sorry, but I cannot recall if I had to add the projects to the Modules folder under the solution.

Coordinator
Jul 11, 2011 at 7:27 PM

Yes, you can "add existing project" to the solution.

Aug 24, 2011 at 4:59 AM

Thank you all for this post.  I was overdue to move over to Orchard.Source.  This made it a snap.

@bertrandleroy - a video would still be great if you get around to it!

Thanks,

Sasha