How to Duplicate Pages and posts in WordPress (Without the Headache)

Need to copy a WordPress page or post fast? Whether you’re building a landing page or testing new layouts, duplicating pages saves time and keeps things consistent. This guide shows you how to do it with a plugin or a bit of code, no fuss, no fluff.
Dean Davis Long Jump
Dean Davis
July 28, 2025

If you’ve ever rebuilt a WordPress page just to make a few small changes, you know how annoying it is. You already made the perfect layout once. Why start over? Here’s how to clone a page, either with a plugin or a bit of code.

Why Duplicate Pages in WordPress?

Duplicating a page creates a full copy of everything: content, layout, images, and settings. Like copy and paste for your whole page.

Why bother?

  • Consistency: Keep the same layout across pages without redoing it.
  • Speed: Save time on design and formatting.
  • Testing: Make changes on a copy without touching the live page.
  • Templates: Build once, clone forever.
  • Backups: Duplicate before edits to play it safe.

So, why isn’t this magical button built right into WordPress? Good question! WordPress aims to be lean and mean out of the box, providing core functionality. Many features, like page duplication, are left to plugins to keep the core software lighter and more flexible.

Easiest Way: Use a Plugin

If you want quick results, use a plugin. Here are two solid ones:

Before installing, check:

  • Number of active installs
  • Recent updates
  • Good reviews

How to Use One

  1. Go to Plugins > Add New.
  2. Search “Duplicate Post” or whichever plugin you prefer.
  3. Click Install, then Activate.

Once activated, you’ll see a new option when you hover over a page title: “Clone” or “Duplicate.” Click it. A draft copy appears.

Duplicating Your Page

After activation, you’ll notice a new option appear in a couple of places:

  1. From the “All Pages” (or “All Posts”) list:
    • Go to Pages > All Pages.
    • Hover your mouse over the title of the page you want to duplicate.
    • You’ll now see a new link, usually called “Clone,” “Duplicate This,” or “Copy to a New Draft.” Click it!
  2. From the Page Editor:
    • When you’re editing a page, look for a button or link in the sidebar (often under the “Document” tab if you’re using the Block Editor, or in the “Publish” meta box if you’re using the Classic Editor). It will usually say something like “Copy to a New Draft.”
duplicate option now showing in WordPress

That copy will:

  • Be saved as a draft
  • Get a name like “Page Title (Copy)”
  • Keep the layout, content, and settings

Open it, rename it, make changes, and hit publish.

Plugin Perks and Pitfalls

Perks:

  • Simplicity: No code, no fuss. Just click and clone.
  • Speed: It’s incredibly fast to duplicate pages.
  • User-Friendly: Perfect for beginners or anyone who just wants things to work without thinking too much.
  • Feature-Rich (sometimes): Some plugins offer extra options, like choosing what elements to copy (comments, custom fields, etc.) or setting default statuses for duplicated items.

Pitfalls:

  • Another Plugin: Every plugin adds a tiny bit of overhead to your site. While a single duplication plugin is unlikely to cause major performance issues, it’s something to consider if you’re already running a dozen plugins.
  • Potential Conflicts: Very rarely, a plugin might conflict with another one, but this is uncommon with popular, well-maintained duplication plugins.

Avoiding Plugins? Do It with Code

You can also add a code snippet to your site if you’d rather not install another plugin. This method uses your theme’s functions.php file.

The Code:

<?php
/*
 * Function to add a "Duplicate" link to the post/page actions.
 * This function hooks into the 'post_row_actions' and 'page_row_actions' filters
 * to add the custom action.
 * It also checks user capabilities to ensure only authorized users can duplicate.
 */
function custom_duplicate_post_link($actions, $post) {
    // Check if the current user has the 'edit_posts' capability
    // and if the post type is either 'post' or 'page'.
    if (current_user_can('edit_posts') && in_array($post->post_type, array('post', 'page'))) {
        // Add the 'Duplicate' link to the actions array.
        // The link points to the 'admin.php' with 'action=duplicate_post_as_draft'
        // and the post ID.
        $actions['duplicate'] = '<a href="' . wp_nonce_url(admin_url('admin.php?action=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', 'custom_duplicate_post_link', 10, 2); // For posts
add_filter('page_row_actions', 'custom_duplicate_post_link', 10, 2); // For pages

/*
 * Function to handle the actual duplication process.
 * This function is triggered when the 'duplicate_post_as_draft' action is requested.
 * It creates a new post/page with the content of the original.
 */
function custom_duplicate_post_as_draft() {
    // Check for nonce for security.
    if (!isset($_GET['duplicate_nonce']) || !wp_verify_nonce($_GET['duplicate_nonce'], basename(__FILE__))) {
        wp_die('Security check failed');
    }

    // Get the original post ID from the URL.
    $post_id = (isset($_GET['post']) ? absint($_GET['post']) : absint($_POST['post']));

    // Get the original post object.
    $post = get_post($post_id);

    // If the post exists, proceed with duplication.
    if ($post) {
        // Prepare new post data.
        $args = array(
            'comment_status' => $post->comment_status,
            'ping_status'    => $post->ping_status,
            'post_author'    => get_current_user_id(), // Set current user as author
            'post_content'   => $post->post_content,
            'post_excerpt'   => $post->post_excerpt,
            'post_name'      => $post->post_name . '-copy', // Add '-copy' to slug
            'post_parent'    => $post->post_parent,
            'post_password'  => $post->post_password,
            'post_status'    => 'draft', // New post is a draft
            'post_title'     => $post->post_title . ' (Copy)', // Add '(Copy)' to title
            'post_type'      => $post->post_type,
            'to_ping'        => $post->to_ping,
            'menu_order'     => $post->menu_order
        );

        // Insert the new post into the database.
        $new_post_id = wp_insert_post($args);

        // Duplicate post meta (custom fields).
        $post_meta_keys = get_post_custom_keys($post_id);
        if (!empty($post_meta_keys)) {
            foreach ($post_meta_keys as $meta_key) {
                $meta_values = get_post_custom_values($meta_key, $post_id);
                foreach ($meta_values as $meta_value) {
                    add_post_meta($new_post_id, $meta_key, $meta_value);
                }
            }
        }

        // Duplicate taxonomies (categories, tags, etc.).
        $taxonomies = get_object_taxonomies($post->post_type);
        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);
        }

        // Redirect to the edit screen of the new draft.
        wp_redirect(admin_url('post.php?action=edit&post=' . $new_post_id));
        exit;
    } else {
        // If no post ID is provided, redirect to the all posts page.
        wp_redirect(admin_url('edit.php?post_type=' . $post->post_type));
        exit;
    }
}
// Hook the duplication function to the 'admin_action_duplicate_post_as_draft' action.
add_action('admin_action_duplicate_post_as_draft', 'custom_duplicate_post_as_draft');
?>

How It Works

  • Adds a “Duplicate” link to your admin page list
  • Copies all the content and settings
  • Saves the new version as a draft
  • Redirects you to the draft edit screen

Add It Safely Use a child theme or a code snippets plugin to avoid crashing your site. Never edit your main theme’s functions.php file directly without a backup.

Manual Method Pros and Cons

Pros:

  • No extra plugin
  • Full control
  • Good for learning how WordPress works

Cons:

  • Easy to break something
  • No extra features or settings
  • Only works as long as your theme supports it

Common Questions

Why isn’t this built into WordPress?

Because WordPress keeps its core simple and leaves extras to plugins, or developers have the knowledge to add this feature themselves.

My plugin doesn’t work!

  • Make sure it’s activated
  • Clear your site cache
  • Disable other plugins to test for conflicts

Can I clone custom post types?

Yes. Most duplication plugins support them. The code above also works with posts and pages.

What about posts?

Same process. These tools work on posts and pages.

When to Duplicate (And When to Skip It)

Good times to duplicate:

  • New landing pages
  • Seasonal campaigns
  • A/B testing
  • Creating reusable templates

Bad times to duplicate:

  • Exact copies with no changes (SEO penalty)
  • Filling your dashboard with unused drafts

Done. Duplicate Pages Like a Pro.

Use a plugin if you want speed and ease. Use code if you like control and don’t mind getting technical. Either way, you’ll save time and keep your layout consistent. Just don’t forget to clean up those unused copies now and then.