How to Duplicate a Page in WordPress?(3 Easy Ways)

Table of Content

Duplicating a page in WordPress is not something you need every day, but it’s quite a handy skill to have in your website management arsenal. Whether you’re creating a new WordPress website or simply experimenting with a particular page or post, page duplication would be time-saving.

Most professional WordPress developers opt for page duplication in WordPress to maintain a consistent style across the website. With consistency in design and layout, they can establish a strong brand identity and ensure a seamless user experience.

Although it seems a little tricky, there are a few different ways to duplicate a page in WordPress. And we’re going to cover them in this blog.

But first, let’s see what page duplication in WordPress is.

What Does it Mean to Duplicate a Page in WordPress?

Simply put, duplicating a page in WordPress means creating an identical copy of an existing web page within your WordPress website. This copy includes all the content, layout, formatting, and settings of the original page. Essentially, it replicates the entire structure and appearance of the source page. That makes it appear as though you’ve created a new page from scratch, but without the need to recreate all the content and design elements.

The primary purpose of duplicating a page in WordPress is to streamline various aspects of website management and content creation. But this feature can also be useful for the following:

  • Maintaining Consistency: If you have a specific layout or design that you want to maintain across multiple pages of your website, duplicating a page with that format can ensure a consistent look and feel.
  • Template Creation: You can use page duplication to create templates for specific types of content, making it easier to create new pages with the same structure or format in the future.
  • Content Experimentation: A duplicate WordPress page allows you to make changes or test different variations without affecting the original page. It’s a safe way to experiment with new designs or content.
  • Time Efficiency: When you need to create multiple pages with similar content or layouts, duplicating a page can save you quite some time compared to starting from scratch.

Duplicating a page in WordPress is a practical feature that simplifies website management, content creation, and design consistency. That’s why it’s a critical tool in the arsenal of a dedicated WordPress development company.

Why Clone a Page in WordPress?

Duplicating a page in WordPress is an essential and powerful feature that offers several important benefits for website management and content creation. Here’s a closer look at the significance of creating a clone of a page in WordPress websites:

  • Branding Consistency: Maintaining a consistent design and layout across your website is crucial for establishing a strong brand identity and providing a seamless user experience. Duplicating a well-designed page ensures that new pages adhere to the same style, preserving the overall look and feel of your site.
  • Time Efficiency: Re-creating the same design elements for each new page can be time-consuming. Duplicating a page in WordPress allows you to start with a proven design template and make only the necessary adjustments. That speeds up the page creation process quite significantly.
  • Template Creation: Cloning a WordPress page can serve as a template for specific types of content or layouts. It’s particularly useful when you have a standard format for articles, product pages, or any other content on your site. It helps maintain consistency while simplifying content creation.
  • Content Experimentation: Duplicating a page provides a safe sandbox for experimenting with changes or updates without affecting the original content. So you can test new designs, layouts, or content variations.
  • Preservation of Content: Before making significant edits or updates to a page, duplicating it ensures you have a backup of the original content. This precautionary measure can be invaluable in case something goes wrong during the editing process.
  • Efficient Replication: When you need multiple pages with similar structures, duplicating a page eliminates the need to start from scratch each time. That is especially beneficial for creating portfolios, galleries, or any content that shares a common layout.
  • Multilingual Websites: For multilingual websites, duplicating WordPress pages and posts and then translating the content can maintain consistency and accuracy across different languages.
  • Client Expectations: If you’re a web developer or designer working with clients, duplicating pages helps meet their expectations for a polished and consistent website. That helps you deliver a high-quality product that aligns with their vision.

Whether you are an experienced professional or a beginner in the space, page duplication in WordPress can be outstanding for enhancing productivity and ensuring design and branding consistency.

How to Duplicate a Page in WordPress?

Duplicating a WordPress page is not as critical a task as you may think. Plus, WordPress is known for its user-friendliness, and it offers multiple methods, including plugins and manual processes, to clone pages. This versatility ensures that users can choose the method that best fits their preferences.

1. Page Duplication Through WordPress Plugins

Arguably, one of the highlights of WordPress is its extensive libraries. They can help integrate almost any sort of feature or functionality in a WordPress website. That includes duplicating a page in your WordPress website. 

Some of the best WordPress plugins for duplicating a page are WP Duplicate Page, Yoast Duplicate Post, Duplicate Page and Post, and more. However, the process of installing the WordPress plugins on the website is similar. Let’s discuss it briefly.

Let’s take a look at 3 of the best plugins for duplicating a page on WordPress websites.

WP Duplicate Page

Website management often involves tasks like creating multiple pages with similar content, testing different page variations, or maintaining a consistent design across your site. In such scenarios, the WP Duplicate Page comes to the rescue. This plugin simplifies the process of duplicating pages, saving you time and effort while enhancing your website management capabilities.

WP Duplicate Page is designed to be lightweight, which means it won’t slow down your website. It’s a reliable tool that gets the job done efficiently.

Here’s the process of using this plugin to duplicate a page in WordPress.

Step 1: Install and activate the WordPress plugin from the official repository.

Step 2: In your WordPress Admin Dashboard, go to “Pages.”

Step 3: Hover your cursor over the page you want to duplicate, and you’ll see the “Clone” option.

Step 4: Click “Clone” to create a duplicate of the selected page.

Step 5: Edit the duplicate page as needed.

With its friendly UI and powerful features, it’s no wonder that this free plugin has garnered positive reviews from WordPress experts for page duplication.

Duplicate Page and Post

With the plugin Duplicate Page and Post plugin, you can clone a page in a WordPress website with just one click. This plugin provides various duplication methods, including creating a draft and copying content with the original date. The experts at our WordPress development agency even use it for copying content as a new child page or post.

Here’s the process of using Duplicate Page and Post:

Step 1: Install the Duplicate Page and Post plugin.

Step 2: Click on the Pages section. It will open a new display showing all pages active on the website.

Step 3: Now, you’ll see an option under the page name, “Click here to Clone”.

Step 4: Click on the new option, and it will create a duplicate of that page of your WordPress website.

This plugin also lets Site administrators define user roles that have permission to duplicate content. So they can ensure the content management tasks are controlled for better security.

Yoast Duplicate Post

Yoast Duplicate Post provides a straightforward way to duplicate pages, posts, and custom post types on your WordPress website. With just a few clicks, you can replicate content effortlessly. This page and post duplicator plugin offers various duplication methods, including cloning content as a draft, copying with the original date, or even copying content as a new child page or post.

Need to duplicate multiple pages or posts at once? Yoast Duplicate Post supports bulk duplication for WordPress pages. That lets you select and clone multiple pieces of content simultaneously.

Here’s how you use Yoast Duplicate Post for page cloning.

Step 1: Install Yoast Duplicate Post from the WordPress plugin library. 

Step 2: Then, in the WordPress admin dashboard, go to “Pages” or “Posts,” depending on what you want to duplicate.

Step 3: After you have installed this plugin, two new options, “Clone”, “New Draft”, and “Rewrite & Republish” will appear under every page, alongside Edit, Quick Edit, Trash, and View. 

  • Clone: Clicking on this option clones the page or post without opening the website editor.
  • New Draft: This option helps duplicate the content and get right to editing it through the editor. 
  • Rewrite & Republish: This option lets you create a live version of the page or content that you can edit effectively. After editing, you can republish the content to the original link with just one click. 

Step 4: Click on “Clone” to create a duplicate of the selected page or post without even opening the editor.

Step 5: Edit the duplicated content as needed.

The plugin is designed to work seamlessly with other WordPress plugins and themes, ensuring it doesn’t disrupt your existing website setup.

With Yoast Duplicate Post, after installing the plugin, you have two options. You can either leave the plugin settings to the default, like most people, or you can adjust them for better results. Here are the three settings you can adjust.

  • Page/Post elements to copy: First off, you can select the elements you want to copy during the page duplication in WordPress. That includes the Title, Date, Status, Slug, Content, Featured Image, and more. If you want the duplicate page to be exactly the same as the original one, select all of the options. Plus, you can customize the Title prefix, Title suffix, Increase menu order by, Do not copy these fields, and Do not copy these taxonomies. After that, save the changes. 
  • Permissions: In this section of the plugin settings, you can customize who can duplicate the pages and posts of your WordPress website. 
  • Display: In the display section, you can ensure New Draft, Clone, and Rewrite & Republish are restricted from public use. Plus, you can customize where these options will be visible. 

You can alter these settings to your desire and make the website development and customization process more friendly. 

Thanks to WordPress’ customizability, you can have personalizations on your websites that are not limited to these plugins. If you want more tailor-made features and functionalities in your website, get in touch with our experts and opt for our WordPress plugin development services.

2. Manually Duplicating a Page in WordPress

Now, although plugins can help you duplicate a WordPress page effectively, the manual method may be helpful if you desire a more personal approach. So, let’s see the step-by-step process for manually duplicating a page in WordPress websites.

Step 1: Access your website through your WordPress login URL.

Step 2: In the WordPress Dashboard, go to the “Pages” section. This is where you’ll find a list of all your existing pages.

Step 3: Hover your cursor over the page you want to duplicate. You will see several options appear beneath the page title.

Step 4: Click on “Edit” to open the page in the editor. Once the page editor is open, select and copy all the content you want to duplicate.

Step 5: Return to the “Pages” section in your WordPress Admin Dashboard and click on “Add New” to create a new page. This will open a blank page editor.

Step 6: Now, on the new page’s editor area, right-click and choose Paste. 

Step 7: After copying the content from the source page to the new page, you can make any necessary edits, such as changing the page title, adjusting the content, or updating images.

Step 8: Finally, after making the desired changes, click on “Publish” to make it live on your website.

This method is more straightforward and doesn’t require any additional plugins. It’s particularly useful when you only need to duplicate a page occasionally or for specific content.

3. Duplicating a Page in WordPress via the functions.php File

Finally, if you are not interested in going the traditional routes for duplicating a page in WordPress, i.e., the plugins or the editor, there is another way to go. 

The ‘functions.php’ file is a crucial part of your WordPress theme. It is a PHP script that allows you to add custom code and functionality to your WordPress website. Duplicating a page in WordPress via the ‘functions.php’ file involves creating a custom function that can be used to duplicate pages.

Editing the ‘functions.php’ file requires coding knowledge, and any mistake in the code can potentially break your website. So make sure to create a backup of your site or the functions.php file before proceeding.

After taking the website backup, follow this process to duplicate a page in WordPress via functions.php:

Step 1: Log into your website’s WordPress Admin Dashboard.

Step 2: Then, in the WordPress file and directory structure, open the functions.php file with a code editor. 

Step 3: Add the following code excerpt.

/*
 * Function for post duplication. Dups appear as drafts. The 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 the current user to be the new post author,
   * then change the 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 and 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 the 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);

If you want to duplicate a post in WordPress, replace the last line with the following.

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

After you have executed this code in the functions.php file, there will be a “Duplicate” option in the All Pages (or All Posts) menu. So you can duplicate a page in WordPress without installing any plugin for it.

Now, as you can see, this process can be a little too technical, and one wrong move can cause the ‘functions.php’ file to have negative consequences for the website. So, if you don’t have the coding skills and experience, I recommend you consult with a WordPress website development company and get help from their experts.

FAQs Related to Duplicating a Page in WordPress

Are there any risks involved in duplicating pages in WordPress?
Duplicating pages itself is not risky, but if you're not careful, you could end up with duplicate content, which can affect SEO. Ensure you edit the duplicate content to make it unique.
Is there a limit to how many times I can duplicate a page in WordPress?
There's no inherent limit to how many times you can duplicate a page, but keep in mind that duplicating too many pages with similar content may not be ideal for SEO, as it can lead to duplicate content issues.
Does page duplication affect the original page?
No, page cloning or duplication means creating a new copy, leaving the original page unchanged. You can edit the duplicate separately. So your original page will be safe and sound.

To Summarize the WordPress Page Duplication

Do you have a page on your website that has turned out to be quite good? Then, rather than creating another from scratch, you may opt to duplicate the page in WordPress. It means creating an exact copy of an existing web page within your website. That helps save time, ensures design consistency, and even lets you test and experiment without the fear of losing the original content. 

To duplicate a page in WordPress websites, you have three options:

  • Through plugins like WP Duplicate Page, Yoast Duplicate Post, and Duplicate Page and Post.
  • Manually, through the WordPress editor.
  • By adding the suitable code excerpt in the ‘functions.php’ file of the WordPress website.

Want to put any of these methods to test and duplicate a page in WordPress for extensive customization? Then contact our experts today!

author
Vish Shah is Technical Consultant at WPWeb Infotech since 2015. He has vast experience in working with various industries across the globe. He writes about the latest web development technologies and shares his thoughts regularly.

Leave a comment