JOIN OUR DAILY NEWSLETTER TO LEARN EVERYTHING FROM SCRATCH

How To Duplicate A Page In WordPress (Solved)

How To Duplicate A Page In Wordpress

Suppose you want to create a page that you have already created in your website’s dashboard. If you know “how to duplicate a page in WordPress” then you can duplicate the page.

But what if you don’t know “how to duplicate a page in WordPress” in that scenario you can also duplicate the page but it will take more then the normal time to do all the stuff.

and if you give more than enough time in that type of thing in which you can solve that problem within some seconds. Then you will only decrease your productivity which will be very bad if you plan for the long term.

Post Description

Chapter 1

  • How To Duplicate A Page In WordPress?
  • Duplicate the page with the help of the plugin?
  • How To Duplicate the page without the plugin?

Chapter 2

  • How to duplicate a page in WordPress in Elementor?
  • How can you duplicate a page in Beaver Builder?

Chapter 3

  • How it affects your SEO?

 

How To Duplicate A Page In WordPress

Chapter 1

How To Duplicate A Page In WordPress?

Now there are two ways in which you can duplicate a page in WordPress.

Both the ways are easy and simple, You can try one of them to do this, So let’s move to the solution

Duplicate the page with the help of the plugin

Now there are many plugins are available to duplicate the page but I will only give you the list of top plugins that have the top review.

duplicate plugin details

1. Duplicate Page and Post

This plugin is one the top of our list because of its simplicity now follow these simple steps to install this plugin and duplicate the page in your website’s dashboard.

1. After installing and activating the plugin, Visit the All Pages option in your website’s dashboard.

2. Now hover on that page which you want to duplicate and click on Duplicate.duplicate-page-post

3. Now the cloned page is available in the all pages option as a draft.

2. Duplicate Post Plugin

Now, this is a very good plugin to duplicate your post or page in the WordPress, We have used this plugin and there is no issue with it.

Simply follow these steps to activate and duplicate the page in WordPress.

1. Install and activate the plugin.

2. Go to your WordPress website dashboard, now click on All Pages option (for cloning a page) or All Post (for cloning a post).

3. Now Hover over the page or post that you want to duplicate, and you will see two options — Clone and New Draft.
How To Duplicate A Page In WordPress

4. Click Clone to duplicate the selected post, or choose New Draft to create a cloned version of the chosen post and open it in the post editor.

3. Post-Duplicator

Post Duplicator is another top plugin that you can use to duplicate the post or page which you want to duplicate while retaining the custom fields and custom taxonomies as well.

You can follow these simple steps to duplicate the page or post:

1. Install and activate the Post Duplicator plugin.

2. Hover over the post or the page you want to duplicate, and click Duplicate Post or Duplicate Page.
How To Duplicate A Page In WordPress

3. There are some settings available which you can use to customize the page or post.

4. You can also set your own title, your cloned post status ( that is draft or publish) and post date. This is also possible to adjust the duplicate’s title and slug.

How To Duplicate A Page In WordPress Without Plugin?

Sometimes, A WordPress website user doesn’t install a WordPress plugin due to some of the reasons, In this situation, the user can also duplicate the page or post without the help of the plugin

/*
 * Function for post duplication. Dups appear as drafts. User is redirected to the edit screen
 */
function rd_duplicate_post_as_draft(){
  global $wpdb;
  if (! ( isset( $_GET['post']) || isset( $_POST['post'])  || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
    wp_die('No post to duplicate has been supplied!');
  }
 
  /*
   * Nonce verification
   */
  if ( !isset( $_GET['duplicate_nonce'] ) || !wp_verify_nonce( $_GET['duplicate_nonce'], basename( __FILE__ ) ) )
    return;
 
  /*
   * get the original post id
   */
  $post_id = (isset($_GET['post']) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) );
  /*
   * and all the original post data then
   */
  $post = get_post( $post_id );
 
  /*
   * if you don't want current user to be the new post author,
   * then change next couple of lines to this: $new_post_author = $post->post_author;
   */
  $current_user = wp_get_current_user();
  $new_post_author = $current_user->ID;
 
  /*
   * if post data exists, create the post duplicate
   */
  if (isset( $post ) && $post != null) {
 
    /*
     * new post data array
     */
    $args = array(
      'comment_status' => $post->comment_status,
      'ping_status'    => $post->ping_status,
      'post_author'    => $new_post_author,
      'post_content'   => $post->post_content,
      'post_excerpt'   => $post->post_excerpt,
      'post_name'      => $post->post_name,
      'post_parent'    => $post->post_parent,
      'post_password'  => $post->post_password,
      'post_status'    => 'draft',
      'post_title'     => $post->post_title,
      'post_type'      => $post->post_type,
      'to_ping'        => $post->to_ping,
      'menu_order'     => $post->menu_order
    );
 
    /*
     * insert the post by wp_insert_post() function
     */
    $new_post_id = wp_insert_post( $args );
 
    /*
     * get all current post terms ad set them to the new post draft
     */
    $taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type, ex array("category", "post_tag");
    foreach ($taxonomies as $taxonomy) {
      $post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
      wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);
    }
 
    /*
     * duplicate all post meta just in two SQL queries
     */
    $post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id");
    if (count($post_meta_infos)!=0) {
      $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
      foreach ($post_meta_infos as $meta_info) {
        $meta_key = $meta_info->meta_key;
        if( $meta_key == '_wp_old_slug' ) continue;
        $meta_value = addslashes($meta_info->meta_value);
        $sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
      }
      $sql_query.= implode(" UNION ALL ", $sql_query_sel);
      $wpdb->query($sql_query);
    }
 
 
    /*
     * finally, redirect to the edit post screen for the new draft
     */
    wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_post_id ) );
    exit;
  } else {
    wp_die('Post creation failed, could not find original post: ' . $post_id);
  }
}
add_action( 'admin_action_rd_duplicate_post_as_draft', 'rd_duplicate_post_as_draft' );
 
/*
 * Add the duplicate link to action list for post_row_actions
 */
function rd_duplicate_post_link( $actions, $post ) {
  if (current_user_can('edit_posts')) {
    $actions['duplicate'] = '<a href="' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '" title="Duplicate this item" rel="permalink">Duplicate</a>';
  }
  return $actions;
}
add_filter( 'page_row_actions', 'rd_duplicate_post_link', 10, 2 );

Now add this code to your website theme’s function.php to work. now if you want to duplicate a post then you can remove that below code from the code that you have pasted in your theme’s function.php.

Paste our given code in place of them to clone a page.

How To Duplicate A Page In WordPress

Now replace above code with our given code below

add_filter( 'post_row_actions', 'rd_duplicate_post_link', 10, 2 );

From this code, you can duplicate a page in WordPress.

Chapter 2

How do I duplicate a page in WordPress Elementor?

After installing the Elementor plugin to your WordPress site follow these simple steps to duplicate the page/post.

1. Open the post or page you want to duplicate in the Elementor Page Builder.

2. Click on the arrow near to the Update button at the bottom of the left corner in the Elementor page builder.How To Duplicate A Page In WordPress

3. Choose Save as a Template.

4. Enter your template title and click on the Save button and your template will be saved.How To Duplicate A Page In WordPress

5. Your page is now saved and you can open your new page in the Elementor.

6. As you can see there are two buttons: Add a new section and Add Template. Click on the ADD TEMPLATE to add the desired template to the page.How To Duplicate A Page In WordPress

7. Click on My Templates option on the next screen. Select the saved template in the next screen and click on the Insert button.

8. Before selecting any template, you can preview the template by clicking the Preview button.How To Duplicate A Page In WordPress

9. Now you can save the changes, and the page which you want to duplicate is now copied.

10. You can change the duplicate page’s content according to your needs.

How can you duplicate a page in Beaver Builder?

Now if you want to copy a page or post in Beaver Builder then you can follow our below tutorial to do this.

1. Now open the page in the beaver builder, which you want to duplicate.

How To Duplicate A Page In WordPress

2. Now Click on the Tools, then Save Template in the beaver builder Bar.

How To Duplicate A Page In WordPress

3. Rename the page title and the slug according to your need on the new page and click Publish or you can save it to draft.

4. Now you can edit your cloned page in Beaver Page Builder.

Chapter 3

How it affects your SEO?

Now let me clear a common misunderstanding about SEO in duplication of post or pages, There is no bad effect on SEO if you change your meta description and keyword according to your need, Your keywords and meta description should not be the same otherwise you will face SEO related problem.

Now I hope your query about “how to duplicate a page in WordPress” has been solved, but if there is something that I missed or you want to share something on how to duplicate a page in WordPress.

Then please comment below, I will be happy to answer all of your questions.

You can read our other posts – 

How Do Bloggers Make Money

Top Websites Fonts To Use In 2020

You May Also Like

About the Author: Shivansh Singh

Leave a Reply

Your email address will not be published. Required fields are marked *

amet, mattis et, ut quis diam odio vulputate, Lorem in quis, elit.