Copied to clipboard

Flag this post as spam?

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


  • Michelle 12 posts 122 karma points
    Jun 16, 2019 @ 16:55
    Michelle
    0

    What is the best way to copy a Live site to a Staging site manaully?

    This may seem straight forward, but very new to Umbraco so want to ensure I am not missing any steps. I simply want the staging site to replicate the live site as they are out of sync. I would usually take a copy of the production database and replace the staging database with that (of course taking backups). As far as I am aware only the user credentials will change. Source code is already the same but not images, content and layout of the pages. The client does not use the cloud to sync sadly so needs to be done manually. Your suggestions would be much appreciated. Thank you in advance.

  • Marc Goodson 2155 posts 14406 karma points MVP 9x c-trib
    Jun 16, 2019 @ 20:05
    Marc Goodson
    100

    Hi Michelle

    So I think from your description this is a site outside of Umbraco Cloud...

    if so then, Yes, first step would be to copy the database from live to staging... in addition to User Credentials, then if you set the Culture and Hostname for your staging site differently, then this would also now be using the live urls.

    When editors have uploaded new media to the site then they will have been created on disk (or cloud storage depending on config) so yes, copy the entire /media folder from live to staging (if they are stored on disk - otherwise copy between cloud storage).

    If you are using Umbraco Forms then the form and workflow definitions the editors will have setup on live will need to be manually copied back to staging: /app_data/UmbracoForms/Data/

    And yes, if any templates html/css/js etc have been changed via the backoffice the /views, /css, /scripts folder too should be copied too.

    and any packages that have been installed on live... compare /app_plugins folder.

    and if any css/js/packages etc have been copied back to staging - increase the client dependency framework config version number by one /config/clientdependency.config

    Once you've copied that all back, and staging is running then you'll need to do a full site republish/rebuild of the nucache, and then your editors should begin to see the live content published in the staging environment.

    regards

    Marc

  • Michelle 12 posts 122 karma points
    Jun 17, 2019 @ 17:51
    Michelle
    0

    Amazing thank you, just what I needed to know :)

  • Michelle 12 posts 122 karma points
    Jun 18, 2019 @ 21:30
    Michelle
    0

    Hi Marc

    I have copied everything over and visually everything is fine except all the urls are pointing at the live site. This includes clicking on the navigation etc. Will I have to change these manually and if so, how?

  • Michelle 12 posts 122 karma points
    Jun 23, 2019 @ 18:54
    Michelle
    0

    For anybody else with this issue, right click on the site node and select "Culture and Hostnames". Edit the URL with the URL for your staging environment and then republish the site.

  • Marc Goodson 2155 posts 14406 karma points MVP 9x c-trib
    Jun 23, 2019 @ 19:20
    Marc Goodson
    1

    Hi Michelle

    Great you got it working!

    Sorry - I mentioned the culture and hostnames thing but totally don't explain it very well!!

    Regards

    Marc

  • Michelle 12 posts 122 karma points
    Jun 23, 2019 @ 19:29
    Michelle
    0

    No problem, your answer was spot on. Managed to successfully clone the site so thanks again for your perfect answer :)

Please Sign in or register to post replies

Write your reply to:

Draft