Installing and Publishing Orchard using WebMatrix
Orchard is a free, open source project aimed at delivering applications and reusable components on the ASP.NET platform. You can learn more about Orchard at www.orchardproject.net.
In this article we will explore how to install, configure, and publish an Orchard application using WebMatrix.
To first install Orchard, you will need WebMatrix installed. This can be downloaded for free at www.microsoft.com/web. You can see step by step instructions on downloading and installing WebMatrix in the Getting Started with WebMatrix article.
Open the WebMatrix once it is successfully installed. Select the "Site from Web Gallery" option.
Here you will see all of the different applications you can install using WebMatrix. Scroll down until you find the Orchard application. Give your application a name and hit "ok".
Here you must accept the license terms. Click the "I accept" button to begin the installation of your Orchard application.
Your Orchard application will begin installing. This may take up to a few minutes.
Once Orchard is done installing you will receive a confirmation message.
Click "ok" to go to your WebMatrix workspace.
Now we need to configure our Orchard application. To do this, click the "run" icon on the menu ribbon.
Our Orchard application will open in your default web browser. Complete the form to configure your Orchard website. We have two options for the database for our application. One of the nice things Orchard offers is the SQL Server compact which uses built in data storage so you do not have to set up SQL Server database.
Once you click “finish setup”, you will be taken to your website where you will be logged in as an admin. Here you can edit the existing content on the page or go to the dashboard.
Your dashboard is where you can manage the content on your site, create new webpages, logs, or configure your site settings. Go to your dashboard by clicking the dashboard link on the bottom of the page.
We can create a new page for our application here on our dashboard. Click the “create page’ link on the navigation menu on the right.
You will be asked to give your new page a title and to add some content to the page. Here you have the option to set this page as your application’s homepage.
We can insert and edit images on our page. There is an insert/edit image icon on the text editor’s toolbar. The pop up box allows us to define our image’s style without having to code the css ourselves.
When you are done adding content to your page, make sure to publish your site. You can choose to publish it now, or at a later time and date. These buttons can be seen at the bottom of the page.
If you did not set your new page as the homepage, you can add this page to the site’s navigation menu. You can manage the main menu by clicking on "Navigation" on the right. You will then be able to manage your main menu. Here you can add the text that will appear on the menu, the position of the page on the menu, and the URL of the page to be added to the menu.
Orchard also offers a blog feature. We can easily create a new blog and add it to our application. To create a new blog, click “Blog” on the menu on the right. Here you can create a new blog. Give the blog a title and a description. You can also choose to show a link to the blog on the main menu or make it as the main page.
Once you have added or changed content, you can publish your application. There are several companies that offer WebMatrix hosting. You can find this information under the Publish icon on the ribbon or by clicking the link on your WebMatrix workspace.
Before you can publish your site, you must configure your publishing settings. Click on the Publish icon and select settings.
Fill in the information sent to you from your hosting provider. If you used SQL Server Compact, you will not need to add a remote connection string for your database.
After clicking publish, you will then be able to choose what files will be published.
Now we wait while it publishes. If it is the first time publishing the site, this may take quite a while. The status of our publishing can be seen on the popup bar on the bottom of WebMatrix.
When publishing is complete, we will receive a message on this bar notifying us. Clicking on our site’s link will open a browser to our site.
We successfully installed, configured and published our Orchard application.