Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • How Do I Delete My Account? 68 posts 433 karma points
    Aug 03, 2015 @ 03:09
    How Do I Delete My Account?

    What is stored in the database and what is not?


    I've installed och programmed a somewhat large site and I'm almost ready to deploy (excited!). What I'm wondering is: what is stored in the database?

    I copied the whole umbraco project when upgrading to Windows 10, just in case. Everything went well so I continued to work on my first "version". However, when I opened the other project in VS and run it, it doesn't contain the same content? (Photos, blog posts etc).

    What is up to date is the icons and the document types in the Umbraco backoffice. But not the files per say. Like the templates, CSS-files etc.

    Why is that? What is really saved in the DB?

  • Kevin Jump 2032 posts 12830 karma points MVP 5x c-trib
    Aug 03, 2015 @ 08:44
    Kevin Jump


    Umbraco stores most you're sites configuration in the database, and little bits relating to the files, so while the templates and stylesheets on on disk they also have an ID in the database, so while you might not use all these bits.

    things completely in the Database are:

    • Document Types
    • Media Types
    • DataTypes
    • Dictionary Items
    • Languages
    • Relations
    • Users
    • Members
    • Content

    Things that are a bit in the Database

    Templates (the files are on the disk, but they all have an ID in the database that is then used in Document types, to define what templates can be used.

    Stylesheets (pre Umbraco 7.3) - they too have an ID, it is only really used in the RTE datatype for defining what stylesheets are included in the editor.

    Media Files - media is stored in the /media folder, but you will see they all have an id folder (so /media/1023/ ) that ID is stored in the database along with any of the additional properties of the media (like dimensions, crops, or any other properties you've added).

    Macros: the Macro settings (so everything under the macro tab) is stored in teh DB , the macro files (partials or xslt or user controls) are stored on the disk

    Things on disk

    • Script Files
    • Partial Views
    • Templates (views) - see above
    • Stylesheets (mosty - see above)
    • Config (in the /config folder)
    • Any custom code (appcode, appplugins, or dlls in /bin)

    Things on disk you don't want (Mainly anything in /app_data )

    when you publish umbraco creates a xml cache of content this is loaded into memory when the site is running and on disk at /app_data/umbraco.config. in general you don't copy this file to a live site, you publish the site on the server and it creates this file.

    Most of the other stuff in app_data is also created by the site, so everything in temp, logs, and cache are generated at run time by the site (when you publish it basically)

    preview is a folder that generates the xml for when you click the preview button.

    What i would copy.

    if you are coping over a site, you need to update the following files (and then the bits of the database)

    • App_Code
    • App_Plugins
    • Css
    • Masterpages
    • Scripts
    • UserControls
    • Views
    • Xslt

    if you are copying media over you need to remember that the folder and the db don't match.

    usually you then need to ensure the site [db] is upto date with: Datatype, document types, media types, templates, stylesheets, macros and language stuff.

    depending on the complexity of the site you might want to automate this :)

    Umbraco Courier is the umbraco package (premium) for syncing to sites, allows you to keep all the settings, content and media in sync between two sites.

    uSync (disclaimer i wrote this): is a package for keeping the above bits (minus content) in sync between two umbraco installs, built as a developer tool, i know quite a few people use it to move to a live server, but it is much more low level, runs of config type things. (usync content edition also does the content and media bits)

  • How Do I Delete My Account? 68 posts 433 karma points
    Aug 03, 2015 @ 12:45
    How Do I Delete My Account?

    Okey. Everything's a little clearer now. Thx for a helpful post! :)

Please Sign in or register to post replies

Write your reply to: