Monday, May 21, 2012
Exporting And Importing DotNetNuke Portals

The first step is to export the portal you wish to move. To do this:-

  1. Login to your portal as a superuser (Host Account)
  2. Navigate to Host -> Portals
  3. Scroll down to Export Template and select the portal to export from the dropdownlist. You can also choose a file name and description if you wish.
  4. Checking include content will also copy the content contained in each page/module.
  5. Click export template

Once the portal has been exported you should receive a message like:-

The Portal Template Has Been Created to D:\Projects\DotNetNuke\Website\Portals\_default\DefaultPortal.template

This will now allow you to create new portals (based on the above template) for this dotnetnuke installation. If you want to create it another dotnetnuke installation, copy the files (to \Portals\_detfault) *.template, and *.template.resources. (where * is your file name)

The .template file is the xml description of the portal and the .template.resources file contains the data for each page/module.

Now that you have exported a portal, you can now create portals based on the template you created. This effectively imports the portal from the template. (note: without users)

To import a portal:-

  1. Login to your portal as a superuser (Host Account)
  2. Navigate to Host -> Portals
  3. Click add new portal
  4. Fill in the normal portal details, except choose the template that matches your exported file name from the dropdownlist.
  5. Once you have completed the details, click create portal

Your portal should now have been created, and you should see your content from your exported module.

 
spacer
DotNetNuke – Publishing Content with Portal Templates Minimize

To start, manage your content using a local or staging version of DNN. Once you have your content where you are comfortable with it and would like to post to your production version, to go the Host>Portals and click Export Portal Template.

Next, choose the website you are working on in the Portal dropdown, enter “test” for your filename, enter a short description and check the “Include Content” checkbox then click Export Template. You’ll want to copy down the location that DNN tells you where it stored your file so that you can go grab the file from there. In my case, the file is stored in the D:\Projects\DotNetNuke\Website\Portals\_default folder.

Now that we have a portal template and the files from the file system, we can simply copy these two files to the /portals/_default folder of the site where we’d like to publish the content and follow these simple steps to update the remote site with your portal template.

Go to Admin>Site Wizard

  • Click Next
  • Check “Build your site from a template”
  • Select the template that you uploaded
  • Check Replace to replace existing content with your new content
  • Click Next
  • Click Next until you are finished
  • Click Home to reload your site’s updated content and navigation structure
 
spacer