How To Convert A WordPress Page To A Post (or Vice-versa)

Converting-wordpress-page-to-post

There are different types of content in WordPress. By default, there are posts and pages. Then there are some plugins and themes which add custom post types for content like testimonials, projects, portfolio items, books, coupons, etc. Or you can even define your own custom post types for better organization of your website content.

All this is a part of your content strategy. You need landing pages, cornerstone articles, regular blog posts, portfolio items and so on. With time, your content strategy changes and there are chances that you need to convert your blog post to a WordPress page or a WordPress page to a post or a WordPress post to a custom post type.

There may also be a case that you want to switch your theme that has CPTs and you want to make sure that your custom posts don’t disappear in the process of changing the theme.

There is a common problem at hand in all these scenarios — that you have to convert from one content type / post type to another. And WordPress doesn’t have this feature built-in yet.

Recently, we were reorganizing our site for implementing SILO architecture. And in this exercise we had to convert a lot of pages to posts and custom post types (like projects, case studies) to regular WordPress posts. It is a tedious task to manually create the pages / posts by copy-pasting the content. It was just not feasible.

Another idea is to run a SQL query in phpMyadmin (recommended for developers only),

UPDATE wp_posts SET post_type = 'page' WHERE post_type = 'post'

Reference: How to change post to page on WordPress Development Stack Exchange

I wanted something simple and easy. So I opted to use Post Type Switcher — a WordPress plugin which allows you to switch / convert the post type without any hassles (and without a line of code).

Converting WordPress page to post with Post Type Switcher

The first step is to install and activate the plugin. Just type “Post Type Switcher” in Search Plugins… input box on Plugins > Add New screen or download the plugin via WordPress repository and upload via FTP.

This plugin can convert nearly every combination of posts, pages, and even custom post types:

  • Page to Post
  • Post to Page
  • Post to Custom
  • Custom to Custom

To convert a single page to post, edit the page that you want to convert. On the page Edit Screen you will find a post type dropdown under “Publish” meta box. Change the post type to “Post”, hit OK and click update. That’s it. Your WordPress page is converted to the post. And the best thing is all your custom fields are preserved as is. It is only the post_type property of a post that is changed.

WordPress Post Type Switcher
Post Type Switcher — Edit Page Screen

Post type switcher also supports bulk editing. Here are quick steps to convert multiple pages to posts or vice-versa:

  1. Go to Pages > All Pages.
  2. Select the pages which you want to convert.
  3. From Bulk Actions dropdown select Edit and click on Apply.
  4. Now you can review the selected posts and change the post type from page to post and Update.
Bulk Editing — Post Type Switcher
Bulk Editing — Post Type Switcher

Post type switcher is a handy plugin. Once you have converted the posts / pages as needed you can deactivate and delete the plugin. Your updates are saved in the database and you don’t need to keep this plugin active anymore.

Have you ever changed a WordPress page to a post or vice versa? Share the method you used for changing the page to post in the comments below!

Comment on How To Convert A WordPress Page To A Post (or Vice-versa)

Your email address will not be published. Required fields are marked *