UPDATE:This plugin has been replaced by pTypeConverter since WordPress 2.9. Please use the new plugin for the newest versions of WordPress.

Well, this is my very first WordPress plugin that I have created. Let me tell you why I finally broke down and created one for myself.

You see, I am an administrator for the Secrets of the Universe and on that site are quite a few static pages. However (probably during an update or server recovery or something of the such) all of the static pages ended up as regular posts, and the permalinks broke. When this was finally discovered, I sought a solution to convert the posts back to pages easily. Well, after searching for such a plugin (I could only find one such called Post2Page yet it was broken, and I could not find any way to contact the author) I stumbled across a few websites that gave me some clues as to get this type of plugin to work. Anyways, that’s the story…I eventually learned how to put it together into a plugin, and here it is for your enjoyment!

This plugin has been updated with its own capability, p2pConverter, which is automatically applied to Administrators and Editors on activation. This capability can easily be modified to work with other roles via a Roles and Capabilities plugin. Also, WordPress updated a hook for manage_page_columns in version 2.5, so Scompt’s extra plugins are not included in this version. If you are using a pre-2.5 version of WordPress, please download one of the Archived plugins.

A couple more new features I would like to highlight are the fact that the Convert option works nicer when using the search bar to find specific posts. Also, you can now convert the post/page while you are editing it, automatically taking you to the edit screen for the new page/post. (I don’t know how many times I have started a post, only to realize that I meant for it to be a page or vice versa…this is very handy to have now!) Just look for the convert option in the bottom right side bar on the edit post/page screen.

Oh, and the newest version also includes a nice AJAX interface in the Manage section.

And this plugin has now been optimized for 2.7.

UPDATE:This plugin has been replaced by pTypeConverter since WordPress 2.9. Please use the new plugin for the newest versions of WordPress.

== Description ==
Converts either a static Page into a Post, or a Post into a static Page! Depending on what type you want to convert, click on Posts or Pages. In the main table of all the Posts or Pages listed, you will see an extra column, with a Convert to Post! or Convert to Page! option. If you want to convert a Page or a Post to the either, click that button. Or you can click the Convert button while editing a Post or Page right next to the Delete and Publish buttons. A p2pConverter role capability prevents unwanted users from converting pages (i.e. only Administrators and Editors have this ability to begin with), which can be adjusted by using a Role Manager plugin.

== Installation ==
Copy the `p2pConverter` directory to your plugins directory and activate the p2pConverter
plugin from WordPress, and volia! You will now be able to convert!

= Version 0.6 =
* Can convert post/page while in Edit Mode (located in bottom right side bar)
* Works nicer when using the search bar to find specific posts/pages
* Easier to mass manage
* Now includes own Role Capability, which automatically defaults to Administrators and Editors (can be adjusted using Role Manager plugin).

This plugin uses scompt’s Manage Custom Pages script, which is included in the zip folder. Please ensure that the managepages.php and json.php files are included in the folder along with p2pconverter.php.

If this is the cases, there might be an issue with another plugin interfering with scompt’s ManageCustomPages plugin.

This plugin saved my life on a corrupted wordpress 2.1 installation at visible-orbit.org. I upgraded to 2.5.1 and then made use of your plugin to turn all the posts (that had mysteriously been converted from pages) back to pages again.

Thanks for your comment. There are currently no plans to add support to integrate with Role Manager unless there is enough request and support for it. If you would like to modify the plugin to integrate like you would like with your website, you may do so as per the GPL license.

Thanks again for your feedback, and let me know if you do choose to modify the plugin!

VERY COOL PLUGIN!!! This plugin works like a charm with 2.5, which saved me hours of time.

One recommendation: Have a batch conversion. You could add in the Page or Post Manage tab an option to convert all posts/pages that are selected. However, even without this feature it’s still relatively easy (unless of course you have hundreds of conversions, but it’s still easier than doing it by hand). THANK YOU. ~Paul

[...] cool new WP plug-ins Found some cool new WP plug-ins – check ‘em out: Post and Page Exerpts Page to Post/Post to Page Converter Show or hide content from bots Internal Link building __________________ Making Coin – great [...]

This plugin does not contain any rewrite rules other than the $wp_rewrite->flush_rules() function. However, after running some tests, it seems that WordPress checks automatically to see if the reference is correct, and if not to redirect it to the correct closest matching URL. Example: If I had a page at http://www.briandgoad.com/blog/test and I converted it, the new URL would become http://www.briandgoad.com/2008/08/test. If I tried to access this page at the previous address, WordPress would automatically forward me to the new URL. This works vice versa, regardless of whether you have converted a post/page or not.
Hope this helps!

[...] Page2Post (or Post2Page) Converter. It’s a simple plugin that converts your posts to pages or vice-versa. I know that I had a lot of pages that had built up over the years, and the original hierarchy had got lost. Not wanting to delete them, they were piling up in my ‘pages’ menu, simple answer: convert them to posts, they’re then archived! Alternatively, if you have a post that is a classic or a foundational type post: why not make it a page? You no longer have to copy and paste it. One click! Voila! [...]

Hi, I need a plugin like this!
I’ve given it a go, but as per my attempts to modify the database manually, I don’t get the ‘converted’ page to display correctly – only an image within the post is converted; the text is lost. And the url goes back to a id# rather than a friendly one.

It might be a permalinks issue? I’ve got the all-in-one-seo plugin (and the permalink redirect plugin) – I they that might affect it, but deactivating it doesn’t help??
Thanks,

[...] I was searching for some way to convert a WordPress post (a blog entry) to a page (static content) without the need to edit individual database entries: ‘post_status’ column – from ‘publish’ to ’static’ etc when I came across p2pConverter [...]

The original guid does properly redirect, though, so this does not appear to be a critical problem. I suspect that the difference between the two formats of guid is left over from earlier versions when pages and posts were more differentiated.

[...] It’s the content that worries me. Yea – content. Why, we’ll it was my suggestion we used WordPress in setting up the site. Then I had another brilliant idea – enter all content into the site as pages, I hope that one doesn’t come back to haunt me. I only figured out a month later that pages in WordPress cannot be categorized. (Now, in perfect WP community fashion – there is a solution to this problem.) [...]

what a great plugin! I did the same thing as the comment above mine. I have over 300 pages that I created for a website, and I may want to convert them to posts for design and category sake and also ease of changing themes. This will make the job tolerable! If I convert the pages over to posts, do I need to continue to keep the plugin active in the future for the redirects to continue to work?

“This plugin uses scompt’s Manage Custom Pages script, which is included in the zip folder. Please ensure that the managepages.php and json.php files are included in the folder along with p2pconverter.php.”

Those files are no longer needed, as Scompt’s Manage Custom Pages script has been integrated into WordPress since version 2.5, thus they are no longer included in the most recent versions of p2pConverter.

The Pages that have been converted to a Post will attain the default category you have listed (i.e. whichever category cannot be deleted). (I will assume you have the latest version of WP, 2.7.0/.1 ) In order to easily modify which category your new posts use, you can check the ones you want to adjust in the Edit mode, and then from the Bulk options drop-down, select Edit. From the new drop-down menus that appear, you can select which category(ies) you want to place them in and hit Update Posts.

Hope this info helps! And I do intend to include bulk edit options soon! (However, there are not currently any good hooks to use for the bulk options, so I am a bit stuck)

hi thanks alot for this tool. one question though, i converted a post to a page but it still belong to a category (I can see it when i click the category it belonged to previously). pages shouldn’t have categories. how can i fix this?
thanks!

Thanks! I had an error at install (from zip), fixed it by uninstalling and reinstalling your plugin (from wp). Posting the error to let you know reinstall worked.
Warning: in_array() [function.in-array]: Wrong datatype for second argument in \wp-admin\includes\plugin.php on line 268

Having trouble with this plugin and 2.7.1 and page slug. Usually the page slug appears below the title text field on the Edit page, but after conversion to a Page the slug isn’t there to edit. I DID notice that if you do a Quick Edit on the page, the slug IS there, but it’d be great for my users to be able to edit the slug where they usually edit it. Any thoughts?

Yahoo upgraded my version of WordPress from 2.3 to 2.8 and all of my pages were converted into posts. Yahoo has not been helpful at all in terms of correcting the problem, although they admitted that it should not have happened. Their engineers are blaming it on my theme, but it happened to TWO of my sites, so I am skeptical.

I’m going to try your plug-in to see if I can fix the problem. 2 years of work! Yikes… I’ll check back in with some results.

The plug-in worked! Fantastic. Very simple. I just published each post (that used to be a page) into a page and the site amazingly figured it out. Like magic! Even the hyperlinks worked again. I am astounded.

Thanks so much. I will now move on to my new site and let you know how that progresses.

You have a great app! Thank you so much for the efforts. I was just wondering (as others are) when you plan to incorporate a Bulk convert function? Is this in the works? If so, when will it be complete? Please let me know!

Thanks for writing this plugin. One suggestion that you could consider is to allow keeping the post/page after converting to page/post because in some situations it would be useful to have an entry as both a page and a post.

Great plugin, but i need to convert all post to pages and import them to another site. Is there any way to convert all post to page without having to manualy config each post? Cause i got lots of post…….

Hi Brian, Thanks for a great plug-in that I used making my first WP blog (when I was wrestling with page vs posts for lots of articles).

Why doesn’t P2P show up in WP Plugin Search under “Add New” with an automatic install option? I’m doing a new blog now and it won’t show up. I’ve searched “P2P” “page to post” “P2P Converter” etc. Nothing.

By the way…it is very easy to manually install P2P by manually copying it to the the PlugIns folder (I use FileZilla). But I’m still annoyed that WP’s built in search is not listing your very useful and functional plug-in.

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off when [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off when [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off when [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off [...]

[...] on and off one by one to see if anything is adversely affecting load time. Some plugins like Page to Post converter don’t need to be enabled 100% of the time. Turn them on when you need them, turn them off when [...]

[...] other changes. If you want to use the imported articles as pages and not posts, you’ll need Post to Page Converter Plugin. AKPC_IDS += "5048,"; Related posts:Squidoo Customer Service, Part II So I mentioned in my Squidoo [...]

[...] If you order a lot of articles, and, like me, use wordpress as a CMS for your projects, here’s a tool to make migrating the posts in easier. Get the CSV2 Post plugin from Zack Preble. Use the article export feature from Textbroker to export your articles in batch. Then use the plugin to import in batch mode. I set the publish date in the import file to a future date, so nothing publishes as result of the import. I can then tweak the articles, add images, add tags, or make any other changes. If you want to use the imported articles as pages and not posts, you’ll need Post to Page Converter Plugin. [...]

[...] If you order a lot of articles, and, like me, use wordpress as a CMS for your projects, here’s a tool to make migrating the posts in easier. Get the CSV2 Post plugin from Zack Preble. Use the article export feature from Textbroker to export your articles in batch. Then use the plugin to import in batch mode. I set the publish date in the import file to a future date, so nothing publishes as result of the import. I can then tweak the articles, add images, add tags, or make any other changes. If you want to use the imported articles as pages and not posts, you’ll need Post to Page Converter Plugin. [...]

Thanks for the great plug-in. I’m cleaning up a clients WP site and her last person had everything as posts, instead of pages, so her blog page wasn’t working correctly. This just save me at least an hour.

[...] putting this off for a while, as as far as I could see the only sane way of doing this was using p2pConverter — a great plugin for converting individual posts to pages and back, but sadly with no bulk [...]

WP 3.0 has custom post types, where we can create more than just pages and posts, but post types of our own design. I would like to convert some of my pages to a custom post type I will create. Will it do this? Or can you change the plugin to do it?

Is it really just a matter of one field in the posts table that needs to be changed, or is there something else?

[...] For everyone else, what Kerry is talking about it the ptypeconverter which you can find here: p2pConverter | Life of Brian Look for the download link just above the comments. This plugin will let you change a post and turn [...]

[...] p2pConverter 0.8» Brian D. Goad (url)This plugin allows you to easily convert a post to a page and vice versa through an easy to use interface. You may either click on your Manage tab in Administration, and you will see a Convert option under Posts and Pages sub-tabs, or click Convert while editing a post or page in the bottom right side bar. A p2pConverter role capability prevents unwanted users from converting pages (i.e. only Administrators and Editors have this ability), which can be adjusted by using a Role Manager plugin. [...]

Thanks for your feedback! We determined that the issue was caused by an old outdated plugin using javascript that loaded on every admin page, causing interferance with other javascripts (like this plugin uses).

I’ve got the old plug-in installed… p2pConverter. So what do I do? Do I first de-activate the old plug-in, or do I leave it activated when I “install & activate” ptypeconverter, and then de-activate p2pConverter?