How to Convert WordPress Posts to WooCommerce Products

If you run a WordPress website with postsyou want to monetize, you can definitely turn them into profitable products with WooCommerce. For example, if you are a photographer and have high-quality images stored on your WordPress website, you can think about selling them with WooCommerce.

Unfortunately, WordPress doesn’t offer a simple way to convert post types in the admin dashboard. However, we’ll show you simple tools you can use to convert your WordPress posts into WooCommerce products.

Method 1 – Execute SQL query in the database

Without any plugins, WordPress posts can be converted into WooCommerce products by simply executing SQL queries – just follow the steps below.

Step 1 – Search the table and create a backup

Use phpMyAdmin and check the wp_posts table. In this table, we will focus on the post_type row.

browse table

WordPress posts display “post” for post_type, while WooCommerce products display “product” instead. Our task now is to change “post” to “product.”

Step 2 – Changing the table with SQL

WordPress has many post types, so you can add the following code to clarify the target data in this row as post.

SELECT * FROM wp_posts WHERE post_type = 'post'

You can set the conditions according to your need. For example, if you only want to convert published posts to WooCommerce products, apply this SQL code.

SELECT * FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish'

After filtering the data, add the following code to SQL.

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

Then the posts that meet the specified conditions will be converted to WooCommerce products.

Note that this query will change the post_type of each post to a product. It is therefore strongly recommended to create a backup of your database beforehand.

Apart from that, any change in the database can be a potential risk. If you are not sure what you are doing, using a plugin is a good choice.

Method 2 – Post Type Switcher Plugin

The popular Post Type Switcher plugin is available for free download from the WordPress repository. Post Type Switcher is considered one of the best plugins for switching post types, including converting posts to product.

Once you have successfully installed and activated the plugin, you can easily change your post types by following the instructions below. You have the choice of converting one at a time or in bulk.

Change post types individually

Once you have installed Post Type Switcher, a new label called Publish will appear on the edit page of each post. To convert a post into a product, follow these steps.

Click on the Edit link, select Product in the drop-down button, then click on Update.

Change post types in bulk

If you need to convert a large number of posts, a plugin is a better choice. In the admin dashboard, go to Posts > All Posts and then select all the posts you want to sell.

In the Bulk Actions drop-down menu, choose Edit and then Apply. A dialog box will appear. In the Post type field, select Product from the drop-down menu.

Press Update.

Method 3 – WP Sheet Editor Plugin

In addition to the free Post Type Switcher plugin, there is another premium plugin that allows you to make changes to thousands of posts, pages and custom post types with its powerful bulk edit tool.

Once you install and activate the plugin, your posts will be displayed in the spreadsheet. Simply go to WP Sheet Editor > Edit Posts to start your work. With this plugin, you can either convert individual posts, posts in bulk or posts based on categories, keywords or tags.

Convert individual posts to WooCommerce products

You can convert each single post into a WooCommerce product by using the spreadsheet. Locate the Post Type column, select Product from the dropdown menu, then click on the Save button.

Your post has been successfully converted into products that you can sell in WooCommerce. Follow these steps for other products as well.

Converting posts to WooCommerce products in bulk

If you have a lot of posts that need to be converted, it’s a waste of time to edit every single post. WP Sheet Editor makes it easy for you.

Use the checkbox to select the posts you want to convert, then select Bulk Edit. A dialog box is displayed where you can now set the appropriate values for converting posts to products.

Then click on Execute now. All selected posts are immediately converted into products for sale in WooCommerce.

Convert posts based on category, keywords or tags

In addition to the two options mentioned above, you can also convert specific posts based on certain keywords, authors, categories or tags.

Select Bulk Edit > I want to search rows to update and edit all search results. A dialog box will appear. Once you’ve decided how you want to filter your posts, click Run search.

The plugin will filter your posts accordingly and redirect you to the bulk edit tool. Now you need to enter the values of your choice.

Click on Execute now and all selected posts will be converted into WooCommerce products immediately.

Summary

There are many different ways to convert your WordPress posts into WooCommerce products. You can run an SQL query in the database, use the Post Type Switcher plugin or the WP Sheet Editor plugin. However, if you are not technically proficient, we strongly recommend using a plugin to save time and avoid potential risks.

The truth is that most people will find the plugin methods much more user-friendly than diving into database queries. While the SQL method gives you complete control, it also comes with more risk if something goes wrong.