can I publish content to another site?

Topics: General
May 30, 2011 at 9:17 PM


I am quite new to this cms. After I finish a site, can I publish all contents to another IIS site?

The reason is that I want users to see things much faster (no need to load all the rendering engines etc). Also I don't want users to have any chance to edit the content, so if I can publish the contents to another site and lock the site we use for editing to be an internal site, we can be very safe.


Many Thanks



May 30, 2011 at 11:53 PM
Edited May 30, 2011 at 11:55 PM

You basically need to sync the files on your IIS with the freshly updated website files. This is pretty much just an XCOPY that replace the 'old' files on IIS. Consider doing this synchronization using a tool like robocopy (much faster).

Borrowing from a thread on I came across reverse use of robocopy which I guess you could easily reverse. Please note the the /MIR switch will truly mirror source to destination, including deleting anything not in the source, so have perfect backups when testing this code.


Robocopy <FTP Server location> <Local server location> /COPY:DAT /ZB /W:10 /R:10 /MIR /V /LOG+<Location you want the log file>

Basically, the above function will copy the enter FTP site to your local PC. Here are each of the parameters:

    /COPY:DAT - Copies the file contains, attributes and Timestamps
    /ZB - Allows file transfers to be restarted (if there is an error downloaded)
    /W:10 Wait ten seconds between attempts
    /R:10 Retry ten times, if failure
    /MIR Mirror the directories. Copy all folders and sub-folders (NOTE: if a file/folder is deleted on the FTP server, it will be deleted here as well).
    /V Verbose output
    /LOG+ Append to the log file

Paste the above command, with all of your information replacing the blank parts, into a command prompt and run it. If you can't find Robocopy, try looking for it in Windows/System32


I would recommend copying a app.offline file (take it from ~/App_Data/Composite) to the web application root folder before you begin synchronizing and then remove the file when done. This will ensure Composite C1 shuts down and stays down during the file sync, ensuring Composite C1 do not execute on a half updated system files.

Note that this will delete any data and state of the public site. If you can data unique for your IIS site, like comments on blog posts or newsletter signups you will need special logic to handle this or ensure this data is not stored on the file system.