# Is there a way to change the parent of a page?

**URL:** <https://www.ruby-forum.com/t/is-there-a-way-to-change-the-parent-of-a-page/107121>\
**Category:** Radiant CMS\
**Created:** [June 18, 2007, 12:20pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-change-the-parent-of-a-page/107121 "2007-06-18T12:20:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 18, 2007, 12:20pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-change-the-parent-of-a-page/107121/1 "2007-06-18T12:20:37Z")

</div>

I created an article under the wrong parent and need to correct that.

Is there a way to do this, or is it better done inside the database  
itself?

I can delete the article and recreate under the right parent, but I’d  
like to know how anyway?

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 18, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-change-the-parent-of-a-page/107121/2 "2007-06-18T12:27:38Z")

</div>

You can use the CopyMove extension:

[http://darcs.bigchieflabs.com/radiant/extensions/copy\_move/rdoc/](http://darcs.bigchieflabs.com/radiant/extensions/copy_move/rdoc/)

Let me know if it’s what you need!

> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

* * *

Andrea F.

removed\_email\_address@domain.invalid  
[http://bigchieflabs.com/blog/](http://bigchieflabs.com/blog/)  
[http://think.bigchief.it](http://think.bigchief.it)

---

<div class="post-metadata">

**Author:** ![vfcforums](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Post date:** [June 18, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-change-the-parent-of-a-page/107121/3 "2007-06-18T15:06:04Z")

</div>

If you’re a little shell and Ruby-savvy, there’s script/console.

$ ruby script/console production

> > new\_parent = Page.find\_by\_url “/url/to/parent”  
> > child = Page.find\_by\_url “/path/to/child”  
> > child.parent = new\_parent  
> > child.save

Sean
