---
title: "Move an item"
slug: "move-an-item"
abstract: "How to move an item using the Sitecore.Data.Items.Item.MoveTo method."
---
# Move an item

You can use the `Sitecore.Data.Items.Item.MoveTo` method to move an item or branch. For example, to move the */Sitecore/Content/Home/Sample* item in the *Master* database to */Sitecore/Content*:

```

Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");

Sitecore.Data.Items.Item sample = master.GetItem("/sitecore/content/home/sample");

Sitecore.Data.Items.Item content = master.GetItem(Sitecore.ItemIDs.ContentRoot);

sample.MoveTo(content);

```