automatic duplicate post (on a new, automatically created page)

Hi, I am wondering if this is possible and if so how it could be done: whenever a new post via WordPress is submitted such that it appears on a new page (let’s call it page X), I need a duplicate of that post to appear on a different page (let’s call it page Y) in which page Y was created only when the original post was submitted.

Here’s an example:

Say I submitted a post via WordPress, with the post directed at the following URL (in which the URL became valid only after the post was submitted):

Now, I need it so that this same post appears on another page, in which this other page was automatically created at the same time the original post was created, and in which the post on this other page exists only by automatically drawing content from the original post. There should be no need for manual intervention (in the way of having to manually create a duplicate post via WordPress, or having to manually create the duplicate page, etc.).

Is this possible?

Since all the wordpress posts are stored in the database, you can just pull new post info from wp_posts table (or your $table_prefix from wp-config.php instead of wp_ ). You may also check wordpress plugins like (this one is not fully automated as you need, but you can look into code to get an idea on duplicating posts).

I suspected as much.

By the way, it’s okay if it’s not fully automated (i.e. it’s okay if there is no automatic page creation), as it’s not too much trouble to create a new page and then paste the relevant PHP template in with a few modifications. However, ideally WordPress (rather than manual editing of PHP pages) would be used in duplicating posts . The Duplicate Post plug-in you mentioned in fact seems to get the job done - but the issue is that it seems to only duplicate posts to the same site that WordPress is located on.

I.e. After duplicating a post, the URL of the post is by default set to (just an example URL; assume site 1 is the site where WordPress is installed), and in this URL I can’t seem to edit anything except “post”, i.e. I can’t edit the rest of the URL. I would ideally like to be able to edit the URL so that the post appears on what is supposed to be another site (let’s call it site 2) i.e. so that the URL of the duplicate post would be something like However, this doesn’t seem possible to do with the Duplicate Post plug-in as it is.

I still think that it would be easier to implement a solution that involves the Duplicate Post plug-in since half of the work is already done with it, so I am wondering if there is a solution - involving the Duplicate Post plug-in - to have post information duplicated on a page but with the URL having “site 2” instead of “site 1”. Is the best way just to create a page on site 1 where the duplicated post info would appear, but then mask the site 1 URL with a site 2 URL? Or is it possible without URL masking?

Thanks for your help - I appreciate it.

Never mind, I think I’ve figured it out! Just duplicate posts via the Duplicate Post plug-in to a special WP category in site 1, have this WP category use a template/css that matches site 2’s template/css, and then hide site 1’s URL with site 2’s URL via domain masking. Problem solved until further notice.

Sponsor our Newsletter | Privacy Policy | Terms of Service