Want to duplicate posts and pages in WordPress and even Elementor templates without manually copy-pasting everything?
Manually copying and pasting content in WordPress can be frustrating, time-consuming, and prone to mistakes, especially if you’re managing a large website or client projects.
Whether you’re creating similar blog posts, service pages, or product listings, duplicating posts and pages is a smart way to save time, maintain consistency, and avoid unnecessary repetition.
This step-by-step guide covers how to duplicate posts, pages, and even Elementor templates using manual methods and plugins.
Key Takeaways
- Learn different ways to duplicate WordPress content: manually or using plugins
- Discover how to duplicate Elementor templates easily
- Save time by bulk duplicating posts and pages
- Add a custom “Duplicate” option using
functions.php
of your child theme - Use free plugins like Yoast Duplicate Post for faster workflows
- Avoid formatting errors and keep design consistency
Why You Need to Duplicate WordPress Posts & Pages
Duplicating WordPress posts and pages is a great way to save time and effort when managing your website. Duplicating content is useful when:
- You want to reuse a layout or page structure.
- You’re creating similar pages (e.g., product pages, service areas).
- You’re setting up templates for clients or team use
- You need to test variations without changing the original content.
How to Duplicate Content in WordPress
Here are several methods to duplicate posts and pages in WordPress, each catering to different needs. We’ll cover both manual and plugin methods for duplicating content in WordPress.
Manually Duplicate Content in WordPress
The manual method of duplicating content in WordPress involves copying the entire text and images from an existing post or page and pasting them into a new draft. This method is straightforward but can be time-consuming, especially for posts with lots of content or complex layouts.
Using HTML Code
If you are using a Gutenberg Editor, then you can duplicate content using HTML code by copying and pasting the HTML structure of a web page or a specific section within it. This method involves manually copying the HTML code from one page and inserting it into another, allowing you to replicate content across different parts of your website. Here is how you can do it:
- Edit the post or page you want to duplicate.
- Click on “Options” and select “Code Editor“.
- Next, copy the HTML code displayed on the page.
Insert Copied Code to Pages & Posts
To insert the copied code into any WordPress post or page, follow these steps:
- Create a new page or post.
- Again, navigate to “Options” and choose “Code Editor.”
- Paste the copied HTML code into the editor.
- Switch back to the Visual Editor to view and edit the duplicated content as needed.
After pasting the HTML code and switching to the visual editor, you’ll notice that the content from the original post has been copied into the current post, effectively duplicating your content. This method allows you to replicate content easily across different posts on your website.
Using Gutenberg Editor
Duplicating content using the Gutenberg editor in WordPress is straightforward. This method helps you quickly copy the layout and content of your posts and pages. It is beneficial when you need to replicate complex designs or want to maintain consistency across multiple pieces of content.
To use this method, follow these steps:
- Open the post or page you wish to duplicate.
- Click on the “Options” menu (three vertical dots) and choose “Copy all Blocks.”
- Create a new post or page.
- Paste the copied content by pressing
Ctrl + V
, or right-click on a blank area and select “Paste.”
Want to extend the power of Gutenberg even more? Check out our list of the best WordPress Gutenberg block plugins to enhance your editor with advanced blocks and features.
Utilizing functions.php File
Another way to duplicate WordPress pages and posts is by editing the functions.php File of your child theme. This method involves adding code to this file to create a duplicate option.
Here’s how you can use it:
- First, find the
functions.php
File in your current theme. It is located in your child theme’s folder under/wp-content/themes/your-theme-name/
. - Next, copy the code provided below into the
functions.php
File. This code will add the option to duplicate posts.
// Functions to Clone a WordPress post as a draft
function clone_post_as_draft(){
global $wpdb;
// Check if a post ID is provided and if the action is 'clone_post_as_draft'
if ( ! ( isset( $_GET['post_id'] ) || isset( $_POST['post_id'] ) || ( isset($_REQUEST['action']) && 'clone_post_as_draft' == $_REQUEST['action'] ) ) ) {
wp_die('No post specified for duplication!');
}
// Security check for nonce verification
if ( !isset( $_GET['clone_nonce'] ) || !wp_verify_nonce( $_GET['clone_nonce'], basename( __FILE__ ) ) ) {
return;
}
// Retrieve the original post ID
$original_post_id = ( isset($_GET['post_id']) ? absint( $_GET['post_id'] ) : absint( $_POST['post_id'] ) );
// Fetch the original post details
$original_post = get_post( $original_post_id );
// Get current user ID to assign as the new post author
$current_user = wp_get_current_user();
$new_post_author_id = $current_user->ID;
// If the original post exists, create a duplicate
if ( isset( $original_post ) && $original_post != null ) {
// Array containing a new post data
$post_data = array(
'comment_status' => $original_post->comment_status,
'ping_status' => $original_post->ping_status,
'post_author' => $new_post_author_id,
'post_content' => $original_post->post_content,
'post_excerpt' => $original_post->post_excerpt,
'post_name' => $original_post->post_name,
'post_parent' => $original_post->post_parent,
'post_password' => $original_post->post_password,
'post_status' => 'draft',
'post_title' => $original_post->post_title,
'post_type' => $original_post->post_type,
'to_ping' => $original_post->to_ping,
'menu_order' => $original_post->menu_order
);
// Insert the cloned post into the database
$new_post_id = wp_insert_post( $post_data );
// Copy all current post terms (categories, tags) to the new draft
$taxonomies = get_object_taxonomies($original_post->post_type);
foreach ( $taxonomies as $taxonomy ) {
$terms = wp_get_object_terms($original_post_id, $taxonomy, array('fields' => 'slugs'));
wp_set_object_terms($new_post_id, $terms, $taxonomy, false);
}
// Duplicate post meta data in a single query
$meta_data = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$original_post_id");
if ( count($meta_data) != 0 ) {
$query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
$query_parts = array();
foreach ( $meta_data as $data ) {
$key = $data->meta_key;
if( $key == '_wp_old_slug' ) continue;
$value = addslashes($data->meta_value);
$query_parts[] = "SELECT $new_post_id, '$key', '$value'";
}
$query .= implode(" UNION ALL ", $query_parts);
$wpdb->query($query);
}
// Redirect to the edit screen for the new draft
wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_post_id ) );
exit;
} else {
wp_die('Failed to duplicate post. Original post not found: ' . $original_post_id);
}
}
add_action( 'admin_action_clone_post_as_draft', 'clone_post_as_draft' );
// Add a clone link to post row actions in the admin panel
function add_clone_post_link( $actions, $post ) {
if (current_user_can('edit_posts')) {
$actions['clone'] = '<a href="' . wp_nonce_url('admin.php?action=clone_post_as_draft&post_id=' . $post->ID, basename(__FILE__), 'clone_nonce' ) . '" title="Clone this post" rel="permalink">Clone</a>';
}
return $actions;
}
add_filter( 'post_row_actions', 'add_clone_post_link', 10, 2 );
To enable the duplicate option for pages, you can use the same code provided earlier. But replace the last line of code as follows:
add_filter( 'page_row_actions', 'add_clone_post_link', 10, 2 );
After saving the file, refresh your WordPress admin dashboard. Then, go to your Posts or Pages section. You’ll notice a new “Duplicate” option when you hover over any posts or pages.
Duplicate WordPress Post & Pages Using Plugins
Duplicating posts and pages in WordPress can be effortlessly done using plugins, making it one of the simplest methods available. These plugins provide convenient options to replicate content on your website with just a few clicks. Here’s a look at some popular plugins developed for this purpose:
Yoast Duplicate Post Plugin
This plugin allows you to clone posts and pages directly from your WordPress dashboard. It preserves all content, including text, images, and metadata, making it easy to create duplicates without altering the original content.
To begin using the Yoast Duplicate Post plugin, first install and activate it on your website. Once installed, follow these steps to duplicate your content using the plugin.
- Navigate to Posts ➝ All Posts to duplicate a post, or Pages ➝ All Pages to duplicate a page.
- Here, you need to hover over the original page or post you want to duplicate. You will see three options to select from:
- Clone: Makes an exact copy of the particular post or page.
- New Draft: Duplicates the post or page and opens it in the content editor for editing.
- Rewrite & Republish: This process duplicates the post or page and opens it in the editor. You can make changes and click “Republish” in the Gutenberg editor, which updates the original post with the new content.
You can also duplicate multiple posts or pages at once. Select the posts or pages you want by checking the boxes beside their titles.
Then, click on “Bulk Actions” and choose either “Clone” or “Rewrite & Republish” from the dropdown menu.
Finally, click “Apply” to duplicate all the selected posts or pages in one go. This method efficiently manages multiple duplications quickly and easily on your WordPress site.
Configure Yoast Duplicate Post Plugin Settings
This plugin duplicates pages and posts in WordPress by default. You can also set it up to duplicate custom post types or adjust which elements get copied during duplication. It means you can change the default settings of the Yoast duplicate plugin by configuring its settings.
- To do this, navigate to WordPress Dashboard ➝ Settings ➝ Duplicate Post.
Here, you will find the three sections: What to Copy, Permissions, and Display.
In the first section, you can choose what elements of the post or page to copy using Yoast Duplicate Post. It includes elements like the title, date, excerpt, content, and more. Check or uncheck the elements you want to copy. You can also adjust other available settings here.
In the permissions tab, Admins and Editors can duplicate content by default, but you can change who can duplicate based on their role. You can also select which custom post types to copy. If you use WooCommerce, you can duplicate content for Coupons and Orders, too.
Next, In the Display section, you can choose which duplicate links appear in your WordPress dashboard: clone, rewrite & republish, and new draft. Just check or uncheck the boxes for the links you want to show. You can also select where these duplicate links appear—on the post list, edit screen, admin bar, and bulk actions —by checking or unchecking boxes in the ‘Show links in’ section.
What Are Some Other Plugins for Duplicating WordPress Content?
You can also use other plugins to duplicate posts and pages in WordPress. Some additional plugins include:
How to Duplicate Elementor Templates
If you want to duplicate your Elementor templates instead of saving and importing them manually, you can do that with the same plugin.
Here’s how to enable template duplication:
Enable Template Duplication in Settings
- Navigate to WordPress Dashboard → Settings → Duplicate Post
- Click on the Permissions tab
- Under Enable for these post types, check the My Templates option
- Save the changes.
Once enabled, go to Elementor → Templates → Saved Templates. When you hover over any saved template, you’ll now see the same duplicate options as you do for posts and pages:
Clone, New Draft, and Rewrite & Republish.
This is a quick and efficient way to replicate Elementor templates without manually saving and re-importing them.
Want more control over your templates? Learn how to import/export, edit, and manage templates inside the Elementor editor in our detailed guide on Manage Templates in Elementor.
Duplicate Your WordPress Posts & Pages Efficiently
Duplicating pages and posts is a great way to save time and effort. If you need to duplicate just one post, doing it manually can work well. However, duplicating multiple posts or pages makes using a plugin easier and safer. It helps avoid mistakes and makes duplicating content across your site much more straightforward. Above, we covered manual and plugin methods for duplicating content, providing flexible solutions to streamline your workflow.
Want to build even faster?
Explore our Elementor Addon Elements plugin, a powerful toolkit of 60+ widgets and extensions that work seamlessly with Elementor.
FAQs on How to Duplicate WordPress Pages & Posts
Why would I need to duplicate a post or page in WordPress?
Duplicating content saves time, ensures design consistency, and prevents formatting errors when creating similar posts or pages across your website.
Can I manually duplicate content without using a plugin?
Yes, you can manually copy content using the Gutenberg editor, HTML code, or by adding custom code to your functions.php
file of your child theme.
Is duplicating content safe for SEO?
Duplicating for internal workflow purposes is safe. Just avoid publishing identical content without changes, as that can hurt SEO through duplicate content penalties.
What are the plugins used to duplicate posts and pages in WordPress?
One of the most popular plugins is Yoast Duplicate Post but there are also several other plugins you can explore to duplicate post & pages in WordPress.
Is it safe to edit the functions.php file for duplicating posts?
Yes, but it’s recommended only for users comfortable with code. Always back up your site or use a child theme to avoid issues.