<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=542871987153600&amp;ev=PageView&amp;noscript=1">

How to Duplicate a Page in WordPress

featured image

One of our readers recently asked about the possibility of duplicating a WordPress page with a single click. Duplicating a post or a page allows you to work on it without changing the original.

In WordPress, duplicating a page or post might go further than simply copying and pasting the information. You may also save time when redesigning your website or upgrading your content by keeping the page structure, SEO data, and graphics.

Fun fact: In HubSpot's CMS Hub, it's incredibly easy to clone/duplicate a page and also it is very easy to run A/B tests. You don't have to install any plugin/app or configure anything. It works out of the box. If you're planning to consider CMS Hub, we can help you with HubSpot development and HubSpot migration as well.

While using WordPress, duplicating any page or post might involve more than merely copying and pasting the information from the original. When you are rebuilding your website or upgrading your content, you may save time by retaining the page template, as well as any SEO data and photos that were previously uploaded.

Fortunately, WordPress makes it simple to duplicate pages and posts as well as all of the data that is linked with them. There are straightforward approaches to achieving the desired results, both with and without the use of a plugin.

In this article, we'll take a look at how to duplicate a page or post in a secure manner, as well as present various plugins that may assist with this process. Let's dive straight in!

What is a WordPress Duplicate Page?

A whole WordPress page can be duplicated and used twice on a website.

It can also be replicated and slightly changed to fit various products, blog posts, or upgrades on a page.

It's easy to make duplicate pages, and they work well for many organisations.

Difference between a WordPress page and a Post

Pages on WordPress are made for long-term use and to serve several purposes, while articles on WordPress are designed for short-term usage and to serve a single purpose. This is the main difference between these two types of content on WordPress.

Pages and posts have almost similar functions, despite the fact that they are used for different purposes. If it is important to do so, you may even combine the two.

Difference between 'Duplicate Content' and 'Duplicating a Page' in WordPress

Before we dive into precise reasons, it’s important to note the distinction between duplicating a page in WordPress, and duplicate content.

The latter is associated with SEO. Having a lot of content on your site that is identical to other stuff on the web is known as having duplicate content. Despite the fact that it may be a negative, it is not something a search engine would penalise you for immediately.

However, this is distinct from ‘copied content’, which is a conscious effort to ‘game’ the search engines and rank higher. In this case, the punishments are harsher since the assumption is that it was done on purpose.

Duplicating your page involves simply copying the formatting, structure, layout, and content of your page. When utilised for this purpose, the replicated page will not be blacklisted by search engines. Next, let's speak about your reasons for doing so.

Why Duplicate a WordPress Page?

If you're happy with how things are now, you might wonder why this is ever a problem.

But you might find that duplicating an existing page is beneficial or even needed at a certain point. Here are the three most common reasons why.

Reuse Content

The most common reason for duplicating a WordPress page is the desire to utilize the original page's content on another page of your site.

It is possible to do this by copying and pasting the actual text; however, it is often much simpler to just clone the entire page.

You will not have to re-format the page or create a new one if you do it this way.

Update Content

The duplicate page plugin is an incredibly helpful tool to have if you are in the process of changing your website or creating new content that is similar.

You are not required to make changes to a live website at the moment.

Instead, create a copy of it, and then make any necessary changes to the structure or content of it before publishing the new page in its place.

It will be updated with new material while maintaining its current general style.

Keep the Same Page Design

Naturally, a lot of effort goes into the architecture of websites.

It may take hours to make sure that a single page has the same design or WordPress themes as all of the other pages, and you don't want to recreate each part of the site separately if you can avoid it.

When you duplicate a page, you may preserve the same layout while just making changes to the content of the page.

Why do you need to Duplicate Pages and Posts in WP?

There are times and situations when you might need to copy pages and posts in WordPress. These are:

  • Building a new site faster by using the old one as a guide
  • Making new pages based on how the old ones are laid out
  • Creating landing pages for products faster
  • Putting out new content, like blogs, more quickly
  • Putting up products immediately

Situations and reasons vary a lot from person to person. So, this is not everything. No matter what the reason is, this article has the answer. Also, you should go through this tutorial because it provides an important lesson for anyone who uses WordPress.

What happens when you Duplicate a WordPress page?

When you make a copy of a WordPress page, very little of the page's content is modified in any way.

It only generates a duplicate copy of the existing page for you.

When you duplicate a post as opposed to a page, the result will have a slightly different appearance. This is because the two types of content are formatted differently.

What doesn't change and why?

If you make a copy of a WordPress post using the "copy" feature, the copy will work exactly the same as the original.

The language and layout will be an identical replica of how the first page of your website appears, and the title of your page will be shown as a "Copy of" in most cases.

You will be able to see it on the part of your account devoted to draughts.

Additionally, WordPress pages do not change and continue to display on the draft page.

What’s different?

When you make a copy of your WordPress page, the design of both copies will be almost identical.

However, depending on the method of duplication, you may notice a little change in the media or style, especially if you have a custom post type. This is especially the case if you have duplicated the post multiple times.

However, the most notable difference ought to be the page's title, in addition to the fact that it has not been published.

Things to consider before you Duplicate a WordPress page:

To begin, you will need to be one of the site administrators or have editing permission in order to make changes to the website. 

Second, some approaches are best suited for achieving particular goals. Therefore, you should choose carefully. 

Third, avoid publishing anything that has already been published. This indicates that you should hold off on publishing the pages or posts until after you have duplicated them. It is known as duplicate content, and having it on your website is harmful for search engine optimization and the reputation of your site.

What you should do is — you may use the duplicate pages as the template, layout, or basis for your new pages or posts. You can do this by clicking on the "Edit" button next to the page you want to use. Before you can publish the pages, the content on them has to be updated or updated regularly.

Duplicating pages is a common norm that may be quite effective for landing and sales websites. As a result, you might choose to keep part of the material related to offers and promotions even after publishing it.

3 Methods to Duplicate a Post or Page in WordPress

Duplicating a WordPress page, post, or any custom post type may be accomplished primarily by one of these three approaches:

  • Via Plugin: Using one of WordPress's various existing specialised plugins is the fastest and most convenient method for duplicating a post or page (most of which are free).
  • Via Editor - If you only care about duplicating the content and design, you may be able to get away with using just the editor if you want to copy the content, depending on how completely you want to duplicate the content.
  • Via Manual code - for those of you who want to do things on your own, you can just add some customized code to the functions.php file of your child theme.

Easily Clone a Page in WordPress with these Plugins

When you make use of a plugin, WordPress makes the process of cloning a page quite simple by putting all of the internal audit inside the administration area of your site. Because you won't be directly affecting your site's code, duplicating a WP post or page via the use of plugins is also the most secure method.

In the case that you are looking for the appropriate plugin, the following is a list of four plugins that are well worthy for you.

1. Duplicate Post

The plugin known as Duplicate Post is often used as one of the WordPress page and post cloning choices. This plugin's user interface is user - friendly, and it copies everything, from the comments related with a page or post to the content of the page or post itself. In addition to this, you have the ability to add a prefix or suffix to your original post in order to differentiate it from the clone.

The following steps are all that are necessary to duplicate a post using this tool:

  1. Install the plugin, and afterwards activate it.
  2. If you want to duplicate articles, go to Posts > All in your WordPress dashboard. If you want to copy pages, click to Pages > All.
  3. You can duplicate a page or post by going to the page or post you wish to copy and then clicking on the Clone button.
  4. Using the Bulk Actions option, you may choose a number of pages or posts at once and then quickly duplicate all of them.

Download Plugin

2. Duplicate Page and Post

Although it does not have a large number of functions, Duplicate Page and Post makes up for this in terms of performance. This lightweight plugin is one of the quickest ways to clone a post or page in WordPress. It won't load down your website with superfluous bells and whistles, and it doesn't need any more storage space.

You may duplicate an existing page or post by following these steps and using this plugin:

  1. Install the plugin, and afterwards activate it.
  2. If you want to duplicate posts or pages, go to Posts > All or Pages > All, respectively.
  3. whatever way you choose to go about it, over the page or post you need to clone.
  4. To make copies, choose the Duplicate option.

Download Plugin

3. Duplicate Page

There are a few additional capabilities that can be discovered in Duplicate Page that can't be found in some other cloning plugins. This plugin will create copies of your posts, pages, and any customized post types you have. In addition, you have the option of saving the copies that are generated as draft, pending, public, or private.

To take advantage of the Duplicate Page feature, all you have to do is:

  1. Install the plugin, and afterwards activate it.
  2. If you want to duplicate posts or pages, go to Posts > All or Pages > All, respectively.
  3. whatever way you choose to go about it, over the page or post you need to clone.
  4. To make copies, choose the Duplicate option.

Download Plugin

4. Post Duplicator

Post Duplicator is yet another simple cloning plugin. Using this solution, an exact copy of any post or page can be generated, including any custom post types, custom fields, and custom taxonomies. It is fast and simple to use, and it should not add a significant amount of weight to your website.

Download Plugin

Creating a Duplicate Page in WordPress without using A Plugin

To clone a post or page in WordPress, you do not need to use a plugin in any way, shape, or form. This may also be done manually by either modifying the functions.php file or copying and pasting the needed code into the appropriate spot in the file. Let's have a look at how each approach fulfills its goals.

1. Enable Cloning by Inserting Code functions.php

Editing the code in the functions.php file is one of the manual approaches you may use in order to duplicate a WordPress page or post. Despite the fact that this may be simple to do, you must proceed with caution and first create a backup of your website.

You will need to access your functions.php file and open it for editing in order to allow cloning for posts. You may do this by using the File Transfer Protocol (FTP) or any other way that is more convenient for you. Then you will need to add the code snippet that is located below at the very end of the file:

/*

 * 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( 'post_row_actions', 'rd_duplicate_post_link', 10, 2 );

To enable cloning for pages as well, use the same code but replace the final line with:

Add filter('page_row_actions', 'rd duplicate_post_link', 10, 2);

After that, you will be able to re-upload the file to your server after saving it first. After that, you may return to the dashboard of your WordPress installation. When you hover your cursor over a page or post that you want to clone, you should now see a Duplicate button appear.

2. Manually Copy & Paste Code to Duplicate a Page

You may manually copy and paste the code for the page or post that you want to clone if you do not want to modify the functions .php file that is connected with your WordPress installation. To be able to do this, you will need to:

  1. Open the post or page that you want to copy and paste.
  2. Simply choose More Tools & Options from the menu.
  3. Select Code Editor.
  4. Make a copy of the page's or post's code.
  5. Simply choose the New Post or New Page option.
  6. Open the Code Editor in your new post or page.
  7. Paste in the code.
  8. Select More Tools & Options from the menu.
  9. Click Visual Editor.
  10. Choose Visual Editor.

This procedure may take a bit of time since you will have to take it out separately for each page or post that you wish to duplicate. Because of this, we strongly advise making use of a plugin if there is a need to duplicate a significant amount of content.

FAQ: How to Duplicate WordPress Page

1. Is there a way to make a replica of a WordPress page?

Yes, you can duplicate pages in WordPress in more than one way. Manual Page Duplication (Copy-Paste) and One-Click Page Duplication are the most common and effective (with a Plugin)

2. How do I copy a WordPress page without the use of plugins?

To copy a WordPress page without plugins, you need to do the following:

  1. From your WordPress dashboard, click the "Pages" menu.
  2. Find the page you want to copy and click on it.
  3. Click on the Options button (three vertical dots at the top-right corner)
  4. From the Options menu, click the "Copy all content" button.

Conclusion: How to Duplicate a WP Page

If you'd like to duplicate a post or a page in WordPress, we hope this guide and the information we've provided is useful.

There are a bunch of reasons why you would really want to make a copy of a page or post in WordPress. It's possible that you'd want to save a copy of this page for future reference. Instead, you may need to copy and paste a current article into your own to serve as a template.

If you're dealing with a bunch of content, manually copying and pasting a page or post might be a headache.

Using a plugin, you may first copy a post or page in WordPress. Duplicate Post, Duplicate Page, and the Post Duplicator are all plugins you can use for this purpose.

Second, you don't really need a plugin to duplicate posts and pages. Enter the code supplied by us in the functions.php file in WordPress and you're done! In the WordPress admin, each post and page will be linked to a second time.

Is there anything you'd want to know about how to copy a page or post in WordPress? In the comments box below, please let us know your thoughts!

You can also reach out to us for troubleshooting any particular issue you’re facing.

Leave A Reply

Related Posts