How to Duplicate a Page in WordPress: A Comprehensive Guide

In this step-by-step guide, we will show you how to duplicate a page in WordPress. It is a great way to create a copy of an existing page, so that you can make changes without affecting the original. Duplicating a page is also helpful when you want to create multiple versions of a pages for testing purposes. Follow the steps below to learn how to duplicate a page in WordPress. 

Why You May Need to Duplicate a Page in WordPress

Knowing how to duplicate a page in WordPress is essential to save time and avoid having to recreate everything from scratch whenever you need a copy of something. 

Duplicating a page or post in WordPress can be incredibly useful for various reasons. For instance:

  1. Create a new version of a page or post so you can test out different designs and layouts without disrupting the original content.
  2. You should use the same layout for multiple pages and posts, such as posts in a blog series or portfolio pieces.
  3. Create an exact copy of a page or post and make minor edits to each version.
  4. You may need to duplicate a page to use as a template for future projects.
  5. Create an exact copy of a page or post for backup purposes.

As a website owner or content creator, it’s essential to know how to duplicate a page in WordPress.

Benefits of duplicating a page

Duplicating a page creates an exact copy of the existing page, which can then be modified with different settings or content. It is especially useful for creating variations of a single item, such as templates, as well as for making minor tweaks to existing content without having to start from scratch.

Here are some benefits of duplicating a page:

  • It provides a convenient and efficient way to create multiple pages or posts with similar content.
  • It saves time by allowing you to duplicate an existing page without starting from scratch.
  • It allows for quick modifications of the original content without a complete rewrite.
  • It makes easy to create multiple variations of a single item, such as templates.
  • It automates the process of creating multiple pages or posts with similar content.
  • It also provides a backup. In case, this changes to the original page cause issues.

Methods to Duplicate a Page

Fortunately, duplicating a page in WordPress is not so difficult. In this article, we’ll walk you through some methods of how to duplicate a page in WordPress. So, you can save time and effort when creating content. These methods are quite simple to accomplish with a few easy steps.

How to Duplicate a Page in WordPress Manually

To manually duplicate a page in WordPress, you need to copy the content from the original page and paste it into a newly created page. To get started, go to “All Pages” and then follow these steps. 

To edit a page, hover over the page from the list of pages.

Hover on the Page
Hover on the Page

Now select Edit under the specific page that you want to duplicate.

Select Edit
Select Edit

Once you have accessed the page editor, follow these steps:

 Highlight all the content in the main content area. To copy the highlighted content, right-click on it using your mouse and select “Copy” from the system menu.

Copy the Content
Copy the Content

To return to the All Pages screen, click on the WordPress icon at the top of the page.

Click on WordPress Icon
Click on WordPress Icon

To create a new page, 

Click on the Add New button. 

Click Add New button
Click Add New button

After opening the new, blank page, right-click and choose Paste to transfer the content from the old page. 

Paste the Content
Paste the Content

Edit the content as needed before clicking Publish from the Publish box at the top right-hand side of the page.

Click on Publish
Click on Publish

TIP: To make sure you copy both the written content and any special code on the page, it’s best to switch to the text/HTML tab editor. 

HT Mega Elementor Addons

The ultimate Elementor page builder addons to build stunning websites.

Download HT Mega for Free

How to Copy Content Using Code

If you prefer the DIY approach, you can create your duplicate page function using custom code. It doesn’t include any additional benefits compared to using a plugin, but it eliminates the need to install another plugin on your site. 

If you want to avoid plugins, this is a viable option and will work with both the regular editor content and Elementor. To use this code, add it to your theme’s functions.php file, or use a code management plugin like Code Snippets. 

If you want to add it to functions.php, be sure to use a child theme.

$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 the action list for post_row_actions

 */

function rd_duplicate_post_link( $actions, $post ) {

if (current_user_can('edit_posts')) {

$actions['duplicate'] = '<a>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 );

The code snippet has duplication enabled for both posts and pages as a default setting. However, if you want to enable it for only one of them, you can remove either the “page_row_actions” or “post_row_actions” filter mentioned at the bottom of the snippet. 

How to Copy Content Using Gutenberg Editor

To duplicate content from the Gutenberg block editor quickly, first, open the Gutenberg editor for the post or page you want to duplicate. 

Next, expand the menu by clicking the three-dot icon at the top-right corner. Choose the option to Copy all content. 

Now, create a new post or page, click on the editor, and paste the content. There are two ways to paste:

  1. Use a keyboard shortcut such as Ctrl + V or Cmd + V.
  2. Right-click your mouse and select “Paste.”

In the Gutenberg editor, you will find an accurate replica of the original content, but manually include the title, categories, tags, etc.

Support Genix
WordPress Support Ticket Plugin

A WordPress plugin adds the features of a comprehensive support ticket system to your WordPress site. Users may now create tickets and get help right from your WordPress site.

Download for Free

Bonus: Duplicating a Page or Post with Elementor

Note – If you want to create a copy of an Elementor page or post, you can use a plugin with the Elementor editor. 

However, if your main goal is to replicate the design of an Elementor page or post, you can do this by utilizing Elementor’s template system. Please note that this method won’t duplicate other metadata, such as categories and authors.

To save your design as a template in Elementor, you need to use the Elementor editor interface. Later, you can insert this template from the Elementor template library into a new post or page. 

Note that the output language code is EN-US.

Elementor’s website kits feature allows you to export/import exclusive website designs if you want to duplicate more than just one page.

With Elementor’s import/export feature, you can quickly create a new website by importing your own designs or using our library of designer-made website kits. 

To efficiently utilize your favorite web design, create a blueprint that can be utilized for various projects. Then, export the complete website and implement it in your other projects. Once the design is applied, personalize it by adding your own content.

Bonus: Duplicate WooCommerce Products Using ShopLentor Post Duplicator Module

ShopLentor is a plugin for WooCommerce that lets you create an online store with a professional look and advanced features using its easy-to-use interface, even if you don’t know how to code. It provides multiple widgets, pre-built page templates, and additional modules, including Post Duplicator. 

The ShopLentor Post Duplicator can duplicate any type of post, including custom post types. This widget makes it simple to create multiple copies of Post in WooCommerce, which can save you time and prevent mistakes. 

To quickly and easily duplicate WooCommerce Posts with ShopLentor, follow these steps:

Go to ShopLentor from your WordPress Dashboard. Access the Settings menu.

Access the Settings menu
Access the Settings menu

Go to Modules and select Post Duplicator.

Go to Modules and select Post Duplicator
Go to Modules and select Post Duplicator

Enable the Post Duplicator module.

Enable Post Duplicator
Enable Post Duplicator

If you need an uncomplicated way to duplicate posts or products in WooCommerce, the ShopLentor Post Duplicator is an excellent choice.

ShopLentor- WooCommerce Builder for Elementor & Gutenberg

A versatile page builder to build modern and excellent online stores with more than 100k Active Installations.

Download ShopLentor for free

Tips for Using the Content Duplication Functionality Effectively

The content duplication functionality in WordPress provides a quick way to copy an existing post or page, including all content, settings, and images. It can be especially useful when creating multiple versions of the same post for different audiences or languages.

Here are some tips for making the most of WordPress duplication functionality:

  1. Determine the best method for duplicating a post or page. Depending on your needs, you can duplicate an entire post or just a portion of it. If you need to create multiple versions of the same post using different content, settings, and images, it is best to duplicate the entire post.
  2. Familiarize yourself with the content duplication option in WordPress. This feature can be accessed from the page or post editor under “Tools”> “Duplicate Post.” Here you will be able to select which elements of the post or page should be duplicated and choose a title for the duplicate post or page.
  3. Choose an appropriate title for the duplicate post or page. When selecting a title, it is crucial to ensure that it accurately reflects the content you are copying. This will make it easier to identify each version of your post so you don’t end up with duplicate posts.
  4. Make any necessary changes to the duplicated post or page. Once you have created a duplicate post or page, be sure to make any edits required to ensure that the content is accurate and up-to-date.

By following these tips, you can ensure that your duplicate posts and pages are optimized for the best results. 

Troubleshooting Common Issues with Duplicated Pages

In some cases, duplicate posts or pages can cause problems in WordPress. This is especially true when creating multiple pages with similar content. 

Here are some common issues and solutions to consider when troubleshooting duplicated posts or pages in WordPress:

Content Duplication

If you have duplicated content on multiple pages or posts, Google may consider this a form of content duplication and penalize your website in search engine rankings. To avoid this issue, use the rel= “canonical” tag to indicate that one page is the original source for the content.

If you have created a duplicate post or page, any links included in the original post may no longer be valid. To avoid this issue, update all internal links to point to the correct destination.

Slow Load Times

Duplicate WordPress posts or pages can cause your website to run slower due to the extra data that is being loaded and processed. To reduce the load time, delete any duplicate posts or pages that are not necessary.

Poor User Experience

To ensure a smooth and efficient website experience, it is important to avoid multiple versions of the same post or page being accessible. When encountering issues with duplicate posts or pages in WordPress, utilize the aforementioned solutions to troubleshoot and resolve the problem. By implementing careful planning and investing time, you can guarantee a well-functioning website.

Frequently Asked Questions

Q: What does it mean to duplicate a page in WordPress?

A: Duplicating a page in WordPress means creating an exact copy of the post or page, including all its content, settings, and metadata. This feature is helpful for creating multiple versions of webpages or posts quickly and easily.

Q: Is it possible to duplicate an entire WordPress website?

A: Yes, it is possible to duplicate an entire WordPress website. This can be done by cloning the site files and database or using a WordPress migration plugin.

Q: What is the best way to duplicate a page in WordPress?

A: The best way to duplicate a page in WordPress is by using a plugin such as ShopLentor Post Duplicator Module. This method is quick and easy and ensures that all content, any type of post, including custom post types, are copied over to the new page.

Q: Which plugins can I use to duplicate a page in WordPress?

A: There are several WordPress plugins available that you can use to duplicate pages in WordPress. Examples include ShopLentor, Duplicator Pro, WP Clone by WP Time Capsule, and BlogVault. These plugins are designed to be easy to use, so you can quickly and easily duplicate your posts or pages in WordPress.

Q: What should I be aware of when duplicating a page in WordPress?

A: When duplicating a page in WordPress, it’s important to remember that the new copy of the post or page will have its own unique slug (URL). This means that if you publish a duplicate WordPress post, it could result in two pages with identical content. It’s also important to note that any images and media used in the original post or page may be duplicated as well, so you should double-check to make sure that everything looks right before publishing. For an extra layer of safety, you should back up your website before duplicate posts on WordPress or anything. 

Final Thoughts

Content duplication in WordPress has many advantages that can help you optimize your website’s performance. With just a few clicks, you can now easily duplicate WordPress posts on your site quickly and efficiently. Not only does this save time in the long run, but it also lessens the chance of making errors with manual coding, which can be very costly. 

To complete the task, use the Duplicate post plugin or a manual duplication from the WordPress dashboard. It will offer great flexibility to optimize your pages for SEO and create versions to test different experiments without altering your original content. As a result, by content duplication in WordPress, you can work smarter and faster with minimal effort! 

Asif Reza
Asif Reza
Articles: 205