How to move items from Web to Master in Sitecore?

From the day we started the development in Sitecore, we always have created or modified items in Master DB and published in the Web DB. It is the practice the whole world follows then why we need to know to move the items from Web DB to Master DB? I think I am crazy to write about it 😛

Just imagine the below 2 scenarios:

  1. Content Editor or Developer accidentally deleted the item from Master DB.
  2. Content Editor or Developer accidentally logged in to Sitecore through CD website (in case you have not blocked the login) and modified some items or created few new items.

In both the scenarios, the changes are in Web DB and we need those in Master DB.

There are 2 ways, we can move these items by using Transfer option or we can modify the publish target database temporarily and publish from Web DB. Lets understand both the approaches.

Scenario: We have different service items under Services, accidentally Content editor deleted few services (highlighted in Red) from Master.
Transfer1

I. Moving the items using Transfer option.

  1. Login to Sitecore with your credentials (Considering you have admin rights)
  2. Go to Desktop interface from Launchpad
  3. Switch the database to Web from Master.
    Transfer2
  4. Go to Content Editor.
  5. Select the item which you want to move to Master DB.
    Transfer3
  6. Right click >> Copying >> Transfer
    Transfer4
  7. The selected item will be shown in the screen, verify it and click Next.
  8. Change the database to Master and verify the parent item. Click Next.
    Transfer5
  9. In case you want the sub items as well then we will check the box for Sub items.
    Transfer6
  10. Click Move. The item is moved to your Master DB.
    Transfer7

II. Moving the items using Publish option.

  1. Login to Sitecore with your credentials (Considering you have admin rights)
  2. Go to Desktop interface from Launchpad
  3. Switch the database to Web from Master.
    Transfer2
  4. Go to Content Editor.
  5. Go to Internet item (/sitecore/system/Publishing targets/Internet) and change the Target database field value to master.
    Transfer8
  6. Save the item.
  7. Go to Services item (Whichever item you want to move to Master DB).
  8. Go to Publish tab >> Click Publish item.
  9. Verify if you need sub items & also the Publishing target should be master.
    Transfer9
  10. Click Publish.
  11. Switch the database to Master and verify the moved items.
  12. Also you can revert the publishing target database value in Internet item to web.

The second option is very handy if we have multiple items at different location that we need to move back to Master DB.

Thank you.. Keep Learning.. Keep Sitecoring.. 🙂

 

 

 

 

One thought on “How to move items from Web to Master in Sitecore?

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s