Move Umbraco 7.x from root website to virtual directory

Common issues:

1. Images stored in media folder is not loading.

2. CSS is not loading

3. JS is not loading

Resolution:

1. Open umbracoSettings.config in Config folder, add “<ResolveUrlsFromTextString>true</ResolveUrlsFromTextString>” in “<content>” section.

e.g.

<content>

<UmbracoLibraryCacheDuration>1</UmbracoLibraryCacheDuration>

<ResolveUrlsFromTextString>true</ResolveUrlsFromTextString>

</content>

2. Open umbraco CMS database, update table “cmsPropertyData” to fix the media path.

UPDATE cmsPropertyData set dataNvarchar = replace(dataNvarchar, ‘/media/’,’/<virdir>/media/’)

where dataNvarchar like ‘/media/%’

3. Re-published entire website to refresh the umbraco.config cache.

clip_image002

4. Re-publish each pages if point 3 does not work.

5. Update necessary template/ layout files.

Update JS & CSS path from "/js/*" to "~/js/*" and "/css/*" to "~/css/*"

image

6. IISRESET

Advertisements

2 Responses to Move Umbraco 7.x from root website to virtual directory

  1. Peter Baulch says:

    Hi Sumardi, thank you so much for posting this article it was so helpful and it works!. Peter Baulch.

    • guozspace says:

      Great!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s