ThimPressThimPress ThimPress
  • Home
  • Best Deals
    • Eduma – Education WordPress Theme – $439 $69 Only!
    • Eduma Mobile – React Native LMS Mobile App for iOS & Android – $149 $54 Only!
    • Storepify – Minimal Multipurpose Shopify Theme – $89 $29 Only!
    • Sailing | Hotel WordPress Theme – $54 Only!
    • LuxStay – Hotel & BnB WordPress Theme – $54 Only!
    • Coaching – Life And Business Coach WordPress Theme – $54 Only!
    • Course Builder – Online Course WordPress Theme – $49 Only!!
    • StarKid – Kindergarten WordPress Theme – $44 Only!
    • IvyPrep – Education & School WordPress Theme – $44 Only!
  • LearnPress
    • LearnPress – LMS WordPress Plugin
    • LearnPress Add-Ons
    • LearnPress PRO Bundle
    • LearnPress Store
    • Eduma Mobile App
    • LearnPress Mobile App
  • Plugins
    • All
    • LearnPress Add-Ons
    • Create Courses Add-Ons
    • Manage Courses Add-Ons
    • Sell Courses Add-Ons

    Plugins33

    LearnPress Pro Bundle (690x460)
    LearnPress PRO Bundle
    LearnPress Semi-Pro Bundle (690x460)
    LearnPress Semi-Pro Bundle
    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    live course
    Live Course Add-On for LearnPress

    LearnPress Add-Ons33

    LearnPress Pro Bundle (690x460)
    LearnPress PRO Bundle
    LearnPress Semi-Pro Bundle (690x460)
    LearnPress Semi-Pro Bundle
    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    live course
    Live Course Add-On for LearnPress

    Create Courses Add-Ons7

    Paid Memberships Pro 690x460px 1
    Paid Memberships Pro Add-On for LearnPress
    Frontend Editor 690x460px
    Frontend Editor Add-On for LearnPress
    Assignments 690x460px
    Assignments Add-On for LearnPress
    Random Quiz 690x460px
    Random Quiz Add-On for LearnPress

    Manage Courses Add-Ons17

    live course
    Live Course Add-On for LearnPress
    Certificates 690x460px
    Certificates Add-On for LearnPress
    Gradebook 690x460px
    Gradebook Add-On for LearnPress
    WPML addon 690x460
    WPML Add-On for LearnPress

    Sell Courses Add-Ons7

    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    Paid Memberships Pro 690x460px 1
    Paid Memberships Pro Add-On for LearnPress
    Stripe add on for LearnPress 690x460px
    Stripe Add-On for LearnPress
    2Checkout add on for LearnPress 690x460px
    2Checkout Add-On for LearnPress
  • Themes
    • All
    • Education Themes
    • Shopify Themes
    • Hotel Themes
    • WordPress Blog & Magazine Themes
    • Free

    Themes14

    Eduma - Premium LMS WordPress Theme
    Eduma | LMS WordPress Theme
    Coaching | Life and Business Coach WordPress Theme
    Coaching | Life & Business Coach WordPress Theme
    course builder
    CorpTrain | Corporate Training WordPress Theme
    onelms education wordpress theme
    OneLMS – Education WordPress Theme

    Education Themes7

    Eduma - Premium LMS WordPress Theme
    Eduma | LMS WordPress Theme
    Coaching | Life and Business Coach WordPress Theme
    Coaching | Life & Business Coach WordPress Theme
    course builder
    CorpTrain | Corporate Training WordPress Theme
    onelms education wordpress theme
    OneLMS – Education WordPress Theme

    Shopify Themes1

    Storepify - Minimal Multipurpose Shopify Theme
    Storepify – Minimal Multipurpose Shopify Theme

    Hotel Themes3

    Sailing Hotel WordPress Theme
    Sailing | Hotel WordPress Theme
    hotel
    LuxStay | Hotel & BnB WordPress Theme
    luxhotel hotel & bnb wordpress theme
    LuxHotel – Hotel WordPress Theme

    WordPress Blog & Magazine Themes3

    megabuilder
    MegaBux | Construction WordPress Theme
    magwp
    Magie | Magazine WordPress Theme
    magazette travel
    Magazette | News & Magazine WordPress Theme

    Free1

    education pack
    Education Pack: #1 Free Education WordPress Theme
  • Blog
    • WordPress Theme Collections
    • WordPress Plugin Collections
    • Shopify
    • Education & LMS
    • Marketing & SEO
    • Tutorials & Docs
  • Our Services
    • Customization
    • Maintenance Service
    • Hosting Service
    • Advertise
  • Help Center
    • Support Forums
    • Ticket Center
    • Documentation
    • Knowledge Base
    • FAQs
    • Contact us
  • 0
  • Sign in

    Sign In

    Lost your password?

    Not a member yet? Sign up now

    Lost Password

    Please enter your username or email address. You will receive a link to create a new password via email.

    Are you a member? Sign in now

Back
  • Home
  • Best Deals
    • Eduma – Education WordPress Theme – $439 $69 Only!
    • Eduma Mobile – React Native LMS Mobile App for iOS & Android – $149 $54 Only!
    • Storepify – Minimal Multipurpose Shopify Theme – $89 $29 Only!
    • Sailing | Hotel WordPress Theme – $54 Only!
    • LuxStay – Hotel & BnB WordPress Theme – $54 Only!
    • Coaching – Life And Business Coach WordPress Theme – $54 Only!
    • Course Builder – Online Course WordPress Theme – $49 Only!!
    • StarKid – Kindergarten WordPress Theme – $44 Only!
    • IvyPrep – Education & School WordPress Theme – $44 Only!
  • LearnPress
    • LearnPress – LMS WordPress Plugin
    • LearnPress Add-Ons
    • LearnPress PRO Bundle
    • LearnPress Store
    • Eduma Mobile App
    • LearnPress Mobile App
  • Plugins
    • All
    • LearnPress Add-Ons
    • Create Courses Add-Ons
    • Manage Courses Add-Ons
    • Sell Courses Add-Ons

    Plugins33

    LearnPress Pro Bundle (690x460)
    LearnPress PRO Bundle
    LearnPress Semi-Pro Bundle (690x460)
    LearnPress Semi-Pro Bundle
    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    live course
    Live Course Add-On for LearnPress

    LearnPress Add-Ons33

    LearnPress Pro Bundle (690x460)
    LearnPress PRO Bundle
    LearnPress Semi-Pro Bundle (690x460)
    LearnPress Semi-Pro Bundle
    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    live course
    Live Course Add-On for LearnPress

    Create Courses Add-Ons7

    Paid Memberships Pro 690x460px 1
    Paid Memberships Pro Add-On for LearnPress
    Frontend Editor 690x460px
    Frontend Editor Add-On for LearnPress
    Assignments 690x460px
    Assignments Add-On for LearnPress
    Random Quiz 690x460px
    Random Quiz Add-On for LearnPress

    Manage Courses Add-Ons17

    live course
    Live Course Add-On for LearnPress
    Certificates 690x460px
    Certificates Add-On for LearnPress
    Gradebook 690x460px
    Gradebook Add-On for LearnPress
    WPML addon 690x460
    WPML Add-On for LearnPress

    Sell Courses Add-Ons7

    WooCommerce add on for LearnPress 690x460px
    WooCommerce Add-On for LearnPress
    Paid Memberships Pro 690x460px 1
    Paid Memberships Pro Add-On for LearnPress
    Stripe add on for LearnPress 690x460px
    Stripe Add-On for LearnPress
    2Checkout add on for LearnPress 690x460px
    2Checkout Add-On for LearnPress
  • Themes
    • All
    • Education Themes
    • Shopify Themes
    • Hotel Themes
    • WordPress Blog & Magazine Themes
    • Free

    Themes14

    Eduma - Premium LMS WordPress Theme
    Eduma | LMS WordPress Theme
    Coaching | Life and Business Coach WordPress Theme
    Coaching | Life & Business Coach WordPress Theme
    course builder
    CorpTrain | Corporate Training WordPress Theme
    onelms education wordpress theme
    OneLMS – Education WordPress Theme

    Education Themes7

    Eduma - Premium LMS WordPress Theme
    Eduma | LMS WordPress Theme
    Coaching | Life and Business Coach WordPress Theme
    Coaching | Life & Business Coach WordPress Theme
    course builder
    CorpTrain | Corporate Training WordPress Theme
    onelms education wordpress theme
    OneLMS – Education WordPress Theme

    Shopify Themes1

    Storepify - Minimal Multipurpose Shopify Theme
    Storepify – Minimal Multipurpose Shopify Theme

    Hotel Themes3

    Sailing Hotel WordPress Theme
    Sailing | Hotel WordPress Theme
    hotel
    LuxStay | Hotel & BnB WordPress Theme
    luxhotel hotel & bnb wordpress theme
    LuxHotel – Hotel WordPress Theme

    WordPress Blog & Magazine Themes3

    megabuilder
    MegaBux | Construction WordPress Theme
    magwp
    Magie | Magazine WordPress Theme
    magazette travel
    Magazette | News & Magazine WordPress Theme

    Free1

    education pack
    Education Pack: #1 Free Education WordPress Theme
  • Blog
    • WordPress Theme Collections
    • WordPress Plugin Collections
    • Shopify
    • Education & LMS
    • Marketing & SEO
    • Tutorials & Docs
  • Our Services
    • Customization
    • Maintenance Service
    • Hosting Service
    • Advertise
  • Help Center
    • Support Forums
    • Ticket Center
    • Documentation
    • Knowledge Base
    • FAQs
    • Contact us
  • Home
  • Tutorials & Updates

WordPress Duplicate Page or Post: How to Do it (2023)

Article In Tutorials & UpdatesBy Duke - December 6, 2022

Do you usually make WordPress Duplicate Page things on our site?

Duplicating a page or post is not something very common when you develop a website. However, it would be a smart move of you if you usually duplicate pages or posts.

Thus, do you need a testing field for a brand new layout? Or maybe for system updates and upgrades? No matter what the situation is, you can always make WordPress duplications by many methods. What you need to notice here is which methods will suit you and your site. In this article, we are very pleased to deliver you the tutorial to explain and guide how to duplicate a page in WordPress.

Before that, let’s get things up: why you should make page/post duplications.

Table of Contents

  • WordPress Duplicate Page: Do You Need It?
    • Manual Copying and Pasting the Content
      • Step 1: Make a Copy Version from the Original Source
      • Step 2: Delete Tags in the HTML
    • Duplicating Posts and Pages with Block Editor
    • Applying a Plugin in the WordPress Duplicate Page
    • Importing Code to the File functions.php
      • Access the FTP Clients
      • Add Code Lines
      • Finish the Process
    • Choosing the Rightful Ways for WordPress Duplicate Page
        • How to Duplicate a WordPress Page: Conclusion

WordPress Duplicate Page: Do You Need It?

Well, you can choose to do it or not. However, there are situations where you will need your site’s duplications, for instance:

– Users are working on the newest version of the theme, plugin, WordPress, PHP, or something related and your site doesn’t have the staging process.

– Want to make a copy to reuse when you make new content.

– You find a dream layout and you would like to try it on your site.

– Need to apply a custom CSS/HTML code to your new website.

As you can see, a duplicated version will bring into play enormous benefits. Well, let’s dip into the methods to duplicate page WordPress.

Manual Copying and Pasting the Content

Simply, you will copy and paste the content into a new version/draft. It looks very easy to approach and we can guess why you choose this method:

– You don’t know the faster method.

– Your site does not own many pages and does not focus on SEO.

– You are duplicating a page that is inaccessible through your site’s back end.

For reasons 2 and 3, we have to agree that copying and pasting hand by hand become the best choice for all of you. Still, this method has some cons. You can’t copy pictures, meta tags, permalinks, custom CSS/HTML, and other elements correctly.

Read more:  Adding Membership plans in LearnPress for your education WordPress website

Here are 2 steps to do it:

Step 1: Make a Copy Version from the Original Source

Well, you can say that Ctrl+A will be the most important factor here. What you will do is get access to the planned site, highlighting, copying, and pasting it to your planned project.

Therefore, you will go straight for the content. Move to the next step.

Step 2: Delete Tags in the HTML

After pasting the content, navigate to your site’s code editor. In here, you will delete all &nbsp; and <span> Meta tags since your site will follow the framework of the code.

As has been said, duplicating manually may bring you potential bugs and errors. To solve this, you may look up other resolutions that still maintain our site.

Duplicating Posts and Pages with Block Editor

Particularly, duplicating with the Block Editor seems semi-manual but it still has almost the same disadvantages as manual duplicating.

To start this, you can open the site and navigate to “More tools & options” in the top right corner menu. Then, choose “Tools” and “Copy all contents”. After that, you will have all content for the new project after pasting it into the planned section.

Applying a Plugin in the WordPress Duplicate Page

Generally, you can do anything in WordPress with plugins and so does page duplications.

First, you will select the suitable plugins: updated within the last 6 months, rated at least 4/5 stars, and can integrate with your WordPress version. Let’s take the Duplicate Page plugin as an example.

Then, you will download and activate it. Navigate to “Pages” -> “All pages”, move to the planned site, and choose the “Duplicate this” button. Well done, you can duplicate a page in WordPress with plugins from now.

Importing Code to the File functions.php

People often say “The tougher the solution is, the more flexible and efficient the result will come out”. On the other side, this saying also applies to this solution. Users can add code to the file functions.php not only to duplicate WordPress page but also to other objectives as well. For more convenience, you may add a link to the dashboard tab. Therefore, it will be very easy for you to make a WordPress clone page.

Read more:  Beginners Guide: How to Install WordPress Theme (Step-by-Step)

Let’s settle down some requirements first:

– Your site’s server accessibility: You can always find the references in the host management panel or in an email sent to you when buying an account for the 1st time.

– A child theme coming from the current parent theme: You can save changes when updating/upgrading the site. Also, your site should have a child theme.

– A text editor: You should choose the suitable one for your purposes.

– A FTP client: Users may access the FTP client in the hosting’s file manager. Besides, you can also use other implements.

Access the FTP Clients

First of all, access the FTP client and navigate to the folder “wp-content” -> “theme”. Thus, you should have the file functions.php in the child theme’s folder. If not, make one first.

Add Code Lines

Afterward, open that file. In there, you will add the below code lines:

/* Duplicate posts and pages function. Duplicates appear as drafts, and 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; /* This gets the original post or page ID */ $post_id = (isset($_GET['post']) ? absint( $_GET['post'] ) : absint( $_POST['post'] ) ); /* …then grabs the original post data. */ $post = get_post( $post_id ); /* To select another user as the post author, use $new_post_author = $post->post_author;. Otherwise… */ $current_user = wp_get_current_user(); $new_post_author = $current_user->ID; /* If the post data exists, create the duplicate */ if (isset( $post ) && $post != null) { /* Create a 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 using wp_insert_post() */ $new_post_id = wp_insert_post( $args ); /* Get all current post terms, then set them against the new 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 of the post metadata */ $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); } /* 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('post_row_actions', 'rd_duplicate_post_link', 10, 2 ); add_filter('page_row_actions', 'rd_duplicate_post_link', 10, 2);

Finish the Process

Lastly, reload and get back to the screen “Pages”. On that screen, you should observe the link of duplicating on this page. Furthermore, you can use this as a plugin and develop it for later uses.

Read more:  Top 7 Best WordPress Plugins for Digital Marketing

Therefore, that’s how to duplicate page in WordPress with a plugin.

Choosing the Rightful Ways for WordPress Duplicate Page

You may think that it’s quite easy to copy page WordPress. Besides, people tend to choose the best and fastest ways to get it done. However, we suggest you should choose a more complex and detailed method based on your demands.

Apparently, a plugin is the most favorable selection for people who just need to duplicate a WordPress page. It will come into action after you download and install your theme, offering all features for all related problems. However, if you intend to make heavy loads of duplications, you may consider the hardcoding solution. On the other hand, you may go on other choices for specific purposes and goals if possible. Thus, it will be worth your budget if it fully serves you.

How to Duplicate a WordPress Page: Conclusion

Looking through things, WordPress duplicate page should be an easy task for any web owner and developer. Based on the demands and experience, each person can choose the different ways to make it done. After this post, we have shown you 4 common methods to duplicate a WordPress post or page. Their difficulties go from the simplest to the most complex one.

Through the article, we believe you would have obtained the rightful solution to duplicate a WordPress page.

Read more: How to Create a WordPress Child Theme (2021)

TAGS: WordPresswordpress guidewordpress plugin

Related Articles

introducing the realpress plugin

Introducing the RealPress Plugin

best learnpress wordpress theme collection

Best LearnPress WordPress Theme Collection for 2023

eduma mobile app

Eduma Mobile App v1.1.0 Update

$69
Education WordPress Theme | Eduma

Live DemoBuy Theme

$54
Coaching | Coaching WordPress Theme

Live DemoBuy Theme

$49
CorpTrain | Corporate Training WordPress Theme

Live DemoBuy Theme

$54
Hotel WordPress Theme | Sailing

Live DemoBuy Theme

$54
Hotel & BnB WordPress Theme | LuxStay

Live DemoBuy Theme

$44
Charitix | Nonprofit Charity WordPress Theme

Live DemoBuy Theme

$44
IvyPrep | Education & School WordPress Theme

Live DemoBuy Theme

$44
Restaurant WordPress Theme - Resca

Live DemoBuy Theme

ADD-ONS FOR LEARNPRESS

  • Combo LearnPress Pro Bundle (690x460)Read more

    LearnPress PRO Bundle

    $610 $299

    The next level of LearnPress - LMS WordPress Plugin. More Powerful, Flexible and Magical Inside.

  • Combo LearnPress Semi-Pro Bundle (690x460)Read more

    LearnPress Semi-Pro Bundle

    $210 $149

    5 Most Powerful as well as Most Wanted Premium LearnPress Add-ons. Compact but Fabulous.

  • Add to cart

    WooCommerce Add-On for LearnPress

    $49

    Easy to connect WooCommerce to your LMS website, easy to sell your courses online with no obstacle.

  • Add to cart

    Live Course Add-On for LearnPress

    $19

    Create courses and live video meetings using Zoom or Google Meet Use shortcode to show the meeting content.

  • Add to cart

    Certificates Add-On for LearnPress

    $39

    Add Drag & Drop certificates builder as well as select designed certificates templates for each LMS course.

  • Add to cart

    Gradebook Add-On for LearnPress

    $39

    Track process and result of students in each LMS course. Allow to export the gradebook to CSV.

thimpress logo

We are a company that is passionate about developing products to help you build your business online. Our very first priority is to guarantee our customers’ experience and satisfaction.

"ThimPress" is a brand of "PhysCode LLC".
Address: 14936 DILLOW ST, #V301, Westminster, CA 92683.
Email: [email protected]


COMPANY

  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Item Support Policy

AFFILIATE

  • Become an Affiliate
  • Affiliate Terms & Policies

SUPPORT

  • Documentation
  • Forum
  • How to get help

PRODUCT

  • WordPress Plugins
  • WordPress Themes
  • Shopify Themes
  • Advertise
  • Partner

FIND US ON

  • Facebook
  • Twitter
  • Envato
  • Youtube
Designed by ThimPress. Powered by WordPress.
DMCA.com Protection Status
  • Terms & Conditions
  • Documentation