Posted on

How To Duplicate WordPress Pages And Posts (4 Ways)

This blog explains how you can duplicate WordPress pages, posts and WooCommerce products simply and also how to manage SEO fields for these pages for better rankings.

Last updated on July 8, 2024

A lot of good content is necessary for SEO. Writing blog posts, landing pages, product pages and other types of pages can take a lot of time.

So, the option of duplication in WordPress is a lifesaver. Duplicate content, make edits and you are good to go.

Since default WordPress or WooCommerce doesn’t provide that flexibility, you are only left with plugins or coding to do the job. But which plugin should you select?

This article will teach you about some top WordPress plugins for duplicating WordPress pages and posts; and how to duplicate using code and Gutenberg editor.

As a bonus, you will also discover a plugin beyond duplicating pages and posts. The plugin allows you to duplicate WooCommerce products, orders, coupons and any WordPress post type, custom fields and taxonomies.

Let’s dive in.

Why duplicate WordPress pages and posts?

Page duplication can save a lot of time and effort for any website or online store. The following are some of the most common reasons why people and businesses produce duplicate WordPress pages and posts:

  • Use the same web page layout or structure while replacing the content.
  • Back up your page or post the previous version.
  • Use the same content as the old page but format the layout differently.
  • Speedily create similar pages and fill content in them later on.
  • Apply the same page design for your product pages and so on.
  • Create similar product pages for product variants.

WordPress duplicate pages and posts are your go-to options, if you need similar/same web page design or content for your new pages. You can keep the component’s position, media files, and other settings this way.

It’s also a good idea to employ duplicate pages while archiving older versions of your pages if you think they’ll be relevant in the future.

Duplicating a page vs. duplicating content

Before we get into the details, it’s worth clearing the difference between duplicating a page and duplicating content in WordPress.

Duplicate content refers to when most or all of the material on one of your site’s pages is identical to that found elsewhere. While it can be detrimental, a search engine is unlikely to penalize you right away for it.

This differs from ‘copied content,’ which is a deliberate attempt to ‘game’ the search engines to rank higher. The consequences are substantially harsh because it’s implied that this is an intentional act.

In contrast to all of the above mentioned, duplicating your page simply means replicating the formatting, structure, layout, and content.

The aim is to use this duplicated page as a foundation for a new one which carries no SEO penalty.

Four ways to duplicate WordPress pages and posts

Whether you want to play with code or use the plugins, it’s your choice! We suggest using plugins to avoid the coding hassle and save you time. The plugins are also free to use.

You can duplicate pages in WooCommerce and post using these four ways:

  1. Manually enable cloning via funtions.php code.
  2. Manually copy and paste the code.
  3. Using editors – Classic and Gutenberg.
  4. Using WordPress duplicate pages / WordPress duplicate posts plugins.

Let’s go into the details for each of them.

Enable cloning via funtions.php code

One of the manual ways to clone a WordPress page or post is to edit the code in your functions.php file. This may look easy, but you do need to be cautious and back up your website first.

To enable post cloning, you’ll need to access your functions.php file and open it for editing, using Secure File Transfer Protocol (FTP) or whatever other method you prefer.

Then you’ll need to add the following code snippet to the end of the file:

/*
 * Function for post duplication. Dups appear as drafts. User is redirected to the edit screen
 */
function sa_duplicate_post_as_draft(){
  global $wpdb;
  if (! ( isset( $_GET['post']) || isset( $_POST['post'])  || ( isset($_REQUEST['action']) && 'sa_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_sa_duplicate_post_as_draft', 'sa_duplicate_post_as_draft' );
/*
 * Add the duplicate link to action list for post_row_actions
 */
function sa_duplicate_post_link( $actions, $post ) {
  if (current_user_can('edit_posts')) {
    $actions['duplicate'] = '<a href="' . wp_nonce_url('admin.php?action=sa_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', 'sa_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', 'sa_duplicate_post_link', 10, 2);.

After that, save the file and upload it again to your server. Next, head back to your WordPress dashboard. A Duplicate button should now appear when you hover over a page or post you want to clone.

Next up is another manual method.

Duplication through a manual process

If you do not want to edit your functions.php file, you can manually copy and paste the code for the page or post you wish to duplicate. To do this, you will need to:

  1. Go to WordPress Admin > Pages (or Posts). Open the page or post you wish to duplicate.
  2. Click on the More Tools & Options menu.
  3. Select Code Editor.
  4. Copy the code for the page or post.
  5. Click on New Post or New Page.
  6. In the new post or page, open the Code Editor and paste in the code.
  7. Click on the More Tools & Options menu.
  8. Select Visual Editor.

The new page or post should now clone the old one.

This process can take time if you do it individually for each page or post you want to duplicate. For duplicating content in bulk, it is not recommended.

Duplicate through Gutenberg and Classic editor

If you’re mainly concerned with duplicating the content/design of a post or page, you might be fine without a plugin thanks to some built-in editor features.

However, this method will only duplicate the content and design. You’ll need to manually recreate important metadata, such as the title, categories, tags, custom fields, etc.

Duplicate posts/pages through Gutenberg (Block editor)

  1. Open the editor for the post or page that you want to duplicate.
  2. Click the three-dot icon in the top-right corner to expand the menu. Then, choose the option to Copy all content.
  3. Now, create a new post or page. Then, click into the editor and paste the content. You can either:
    1. Use a keyboard shortcut like Ctrl + V or Cmd + V.
    2. Right-click and choose paste.

You would see an exact copy of the original content in the editor. It will contain only the text and nothing else. Make sure to add the title, categories, tags and other details manually.

Duplicate posts/pages using Classic editor

You could consider this option the ‘brute-force’ method.

Open both your current and new pages in separate tabs. This is not necessary but it makes the process easier. Then, copy the content you’d like to move, switch to the other tab and paste it in. That’s it.

Duplicate using plugins

The biggest drawback of manual methods is that it doesn’t carry over any of your SEO settings, metadata, permalink slugs, taxonomies, or anything else other than your page’s or post’s body content.

You’ll have to keep switching between tabs to ensure everything is copied and pasted properly.

The manual method is pretty sufficient for one or two posts. But to do it in bulk, save time and reduce human errors, you need to switch to the plugins.

We have covered the most popular free and paid plugins below for you.

Five popular WordPress duplicate page and post plugins

Plugins that serve the purpose you are looking for can help you win half the battle.

Check out five of the most promising and popular WordPress duplicate pages or post plugins.

Yoast Duplicate Post

This is the most popular WordPress duplicate page plugin with 4 million+ and 450+ five-star reviews.

This plugin lets WordPress site owners clone posts of any type or copy them to new drafts for further editing. There is also a template tag, so you can use it for frequent duplication of your posts/pages from the front end.

The plugin also provides additional and other useful settings that help customize its behavior. It also restricts its use to certain roles and post types.

Yoast Duplicate plugin
Yoast duplicate plugin options

Top features:

  • Duplicate pages and posts as drafts.
  • Do bulk duplication of pages or posts.
  • Select which elements you want to copy.
  • Determine who of your editors get access to the duplication feature.
  • Edit your content within WordPress, without taking it offline.

Pricing: Free

Download Yoast Duplicate Post plugin

Duplicate Page plugin

Duplicate Page Plugin, as its name states, enables you to create duplicate pages, posts and custom posts. You can directly click duplicate for a page and choose the status of the new page as Draft, Public, Pending, or Private.

3+ million active installs and 300+ five-star reviews speaks about the popularity of this plugin.

But most of its features (such as changing the page status, changing the post type for a cloned page and redirection) are only available to Pro users.

Duplicate Page plugin

Top features:

  • Select where to show the duplicate page link – post edit page, item row on the post landing page, under the post button on the admin bar.
  • Set a default Prefix and Suffix to your duplicated pages.
  • Option to select a duplicated post Status.
  • Set role-based access restrictions for duplicated pages.
  • Option to Redirect after clicking on the clone link.
  • The plugin also allows cloning link locations. This is the option where to show the clone link.
  • Allows adding many more features and filters.
  • Offers the option to change duplicate post link titles.
  • Allows creating a clone of a particular custom post (CPT).
  • Offers options to select the editor (Classic and Gutenberg).

Pricing: Free version on WordPress.org, Pro version for $15

Get Duplicate Page plugin

Post Duplicator

This plugin has 200,000+ active installations and has 60+ 5-star ratings.

The Post Duplicator is also a simple plugin for creating duplicate pages. Custom post types are supported, along with custom taxonomies and custom fields.

This plugin is simply meant to quickly and easily duplicate a post. Just hover over a post in the edit screen and select ‘Duplicate {post_type}’ to create a duplicate post.

Post Duplicator

Key features:

  • Create and duplicate multiple posts quickly.
  • Support for all custom post types.
  • No need to configure settings.
  • Allows adding custom fields such as texts, images, checkout boxes and radio buttons on the duplicated posts.
  • With the duplicated post, you can edit or delete the information without affecting the existing version.

Pricing: Free

Download Post Duplicator plugin

Duplicate Page and Post

The plugin has 100,000+ active installations and is yet another promising alternative in the world of WordPress duplicate posts.

With the Duplicate Page and Post WordPress plugin, you can clone any of your pages or posts as Draft. After that, you can also update the post suffix, redirect and post status for the replicated page using this WP plugin.

Duplicate Page and Post

Top features:

  • Helps choose between the Classic or Gutenberg editors.
  • Option to add custom text for duplicate link button, which enhances the user experience.
  • Option to redirect after clicking on Duplicate.
  • Allows cloning custom posts (CPT). This helps users replicate any custom posts, thereby streamlining the work process.
  • The redirect option redirects the users after clicking on Duplicate, which improves navigation and user-friendliness.

Pricing: Free

Download Duplicate Page and Post plugin

Smart Manager

The plugins mentioned above are limited to duplication. Smart Manager, on the other hand, goes well beyond that.

Duplicate WordPress pages, posts, WooCommerce products, orders, coupons, any WordPress post type, their custom fields and taxonomies using Smart Manager.

For any WordPress site that is growing in terms of content and traffic, the Smart Manager plugin could prove a blessing for the publishers.

Smart Manager WordPress posts dashboard

With Smart Manager, your operations team and marketers can focus on primary tasks rather than staying stuck on page creation and other trivial tasks.

Click on the page/post you want to clone, click on the Duplicate option and it’s done. Super easy and quick!

Duplicate pages, posts, WooCommerce products with Smart Manager?

To duplicate posts, pages, or custom post types in WordPress using the Smart Manager plugin, follow these steps:

  1. Go to WordPress admin > Smart Manager. Select any dashboard: Pages, Products or Posts using the dropdown menu on the top of the page.
  2. Look for the page to be cloned or duplicated. You can search for a phrase or page ID using the search bar.
  3. Select the page(s).
  4. To perform duplication, hover on Duplicate and click Selected Records. You may also perform complete duplication of your site by clicking the Entire Store.
duplicate products with Smart Manager

This action will duplicate posts, post meta, related taxonomies and all other data in the selected items for you. So, if you use the Smart Manager plugin, you can easily retain your SEO fields and data when you clone a page.

After that, you can edit data using the rows enlisted in front of you.

Try the live demo

Benefits of Smart Manager’s duplication and other features

  • Duplicate post, page, or any custom post type (order, coupons, products, media).
  • Export any post-type data as CSV.
  • Add/edit new posts and pages directly. With in-line editing allowed for your data, it is very convenient to update it. You can even use copy, paste and cut commands while using this plugin.
  • Directly edit post title, post content, post status, post excerpt, featured image, publish date, comment status, parent page, post categories and post tags.
  • Bulk edit or mass update all WordPress core fields.
  • Bulk edit post status, post categories, post date, SEO status, etc.
  • Create multiple posts at once.
  • Quickly duplicate and edit products, orders, coupons, pages, users and more.
  • Edit data of any field or SEO fields of your posts/pages without opening them.
  • Simplest duplication and export (one-by-one as well as bulk).
  • Delete pages, posts, custom post types, or their data one by one, or in bulk.
  • Update ‘Product Gallery Images, Featured Images’ directly.
  • Create custom views for posts and pages. For example, a view that consists only SEO related fields.
  • Edit hundreds of posts without reloading the page.

Manage Yoast, RankMath SEO fields

Smart Manager plugin is compatible with multiple SEO and WooCommerce plugins. You can easily manage SEO fields of RankMath or Yoast on your page/post in Smart Manager.

Here’s what you can do:

  • Avoid similar keywords multiple times.
  • Redirect poor converting blog posts from one place.
  • Export SEO fields as CSV and compare performance.
  • Allow search engines to follow links.
  • No index non-performing posts in bulk.

Get Smart Manager plugin

Conclusion

Manually adding WordPress pages or posts to a website is surely a time-consuming task. When you need to clone post types in bulk, it becomes daunting. So, be smart and use a trustworthy plugin for this purpose.

Choose any of the plugins for duplication mentioned above and it will do the desired job for you.

However, if you want an all-in-one solution that handles duplication and store management faster and with ease, Smart Manager by StoreApps should be your pick, undoubtedly.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.