How to Properly Delete All WooCommerce Products

Have you ever thought that you will remove all the current products and import product the new ones?  To Delete All WooCommerce Products is extremely necessary at this moment. So far, woocommerce has not had a proper feature to do this task. If you have just 10 products, you can do it manually. But if you have 10.000 products, you have another thought. There are some fee-charging plugins but I have never used them. I have used some free plugins but they do not support you to delete taxonomy.

To me, deleting products by with database is quickest and simplest. If you follow this article, you may do it better than me because you just need to copy and click the “run” command.

Log inphpmyadmin

There are several ways to log in. You can get access to the link youdomain/phpminiadmin or use phpminiadmin.php. Or you can carry out in the cpanel of hosting. If you are not sure about this, you should contact your hosting supplier. If there is more than one database and you are not sure which database you are working with, you should open the database and get to wp_options. This table lets you know which url of the website the database is working on.

Or you can open wp-config.php file to check the corresponding database.

Run the SQL command

After defining the exact database, the first thing to do is back up the database because you may destroy your website accidentally. Next, you click on SQL as below

Delete All WooCommerce Products

DELETE relations.*, taxes.*, terms.*

FROM wp_term_relationships AS relations

INNER JOIN wp_term_taxonomy AS taxes

ON relations.term_taxonomy_id=taxes.term_taxonomy_id

INNER JOIN wp_terms AS terms

ON taxes.term_id=terms.term_id

WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type=’product’);

DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = ‘product’);

DELETE FROM wp_posts WHERE post_type = ‘product’;

Delete All WooCommerce Products

Now, click on Go. All the products will be deleted. If it shows error, commonly it is due to your wrong prefix. The code uses default WordPresswp_. However, if you use automatic installation service of the hosting supplier, the code may be changed. You should check if the name of the table is right. On the left of the screen, it has the format of prefix_post, as wp_post by default. You should edit it properly.

The article Delete All WooCommerce Products ends here. If you have any question, please contact us. As we have mentioned, this solution is used when you want to import all new products. If you use Prestashop, you could try using Import product module here https://addons.prestashop.com/en/fast-mass-updates/27281-csv-import-products.html You can use the demo site before deciding to own this module. You are also provided with technical support by the support team when using it.

 

 

 

What is the difference between import and export

“ What is the difference between import and export ” is the question that many people are interested in. There are different answers in different fields which cause disputes between people. However, we can see the difference clearly when deeply studying this issue. Therefore, this article focuses on explaining to the readers so that you can understand well.

What is the difference between import and export

Firstly, we can understand that import is related to input while export is related to output. Experts in information technology have different perspectives with people work in financial and economic field.

From the perspective of information technology

Import is the process of information input. When we talk about software, the input information could be texts, media files such as music and film. Or you must have heard the phrase “import product”. This is the process you importing products information to database. Thousands of products can be imported in several minutes.

Export is the process of information output. In computer software, the export information could also be texts, and video files, etc. Similarly, exporting product is the process of outputting product information to excel, csv, xml, etc. It is to get these files to send to others who will use them to import information to their computer as the process above.

From the perspective of the economy

What is the difference between import and export ? It is not limited in the scope of a computer. Its meaning covers the scope of international.

Import is the process of local companies purchasing goods or services from other countries. The reasons import is that these kinds of products meet the demand of domestic users at reasonable prices. Or local enterprises do not have enough capacity to produce them due to out of date facilities or high manufacturing costs. Import turnover depends primarily on the exchange rate. If the domestic currency is stronger, you will buy more foreign currency. It means you will increase the import turnover.

Export is when local companies sell goods and services to others countries. It happens when the domestic manufacturing costs are lower. Or companies want to penetrate new markets and internationalize their products. Or maybe local consumers do not have demand for these kinds of products. The positive effect of export is that it reduces the issue of supply much more than demand within the country. As well as import, export is related to the exchange rate. If the domestic currency is weak, the exporter will get more when exchange foreign currency to domestic currency. Therefore they want to export more.

We have finished the article “ what is the difference between import and export ”. There may be many meanings in other fields but we stop here. Let us know if you have any comment. We are looking forward to hearing from you.