WordPress.org

Ready to get started?Download WordPress

Forums

Is there an easy way to move subpages (5 posts)

  1. pmv
    Member
    Posted 6 years ago #

    I am supposed to organize big wordpress-site with few hundred pages and subpages. So now I'm looking the best and fastest way to move pages under another page.

    At the moment only way to move page is to edit it and select new parent page from the menu. That way this is going to last forever.

    Any plugins? Other ideas?

  2. MichaelH
    Member
    Posted 6 years ago #

    This SQL statement worked using phpMyAdmin
    UPDATE wp_posts SET post_parent = '4' WHERE post_parent = '2';

    Please perform a backup of your database before attempting this!

    Resource:
    WordPress Backups
    Backing Up Your Database

  3. Jeremy Clark
    Moderator
    Posted 6 years ago #

    I guess you could edit the database directly. Look in your wp-posts table and pay attention to the post parent field. You could just run a find and replace on just the field. Before you do any messing with the database BACKUP BACKUP BACKUP.

    MichaelH was 4 seconds faster and with the actual sql statement to boot :).

  4. pmv
    Member
    Posted 6 years ago #

    I know I can change parent field in sql. I was just hoping to find some plugin where I could just mark the pages I want to move and select the target. The problem is I need to move many pages from different locations under same page.
    Perhaps the best way is to do something like
    UPDATE wp_posts SET post_parent = '4' WHERE id IN (list of ids)

  5. MichaelH
    Member
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic