How to delete all WooCommerce products via SQL

 

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';

To delete all WooCommerce attributes login to phpMyAdmin and run this SQL.
DELETE FROM wp_terms WHERE term_id IN
(SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%');
DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%';
DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN
(SELECT term_taxonomy_id FROM wp_term_taxonomy);

To remove IP address from a OpenVz contain use:

vzctl set <CTID> --ipdel <IP1>

Example:
vzctl set 101 --ipdel 10.0.0.1  --save

If you get "Can't locate local/lib.pm" ,  you can install the missing perl library using cpan.
cpan local::lib

If cpan is missing you should first install it using:
yum install cpan

If you get Can’t locate Time/HiRes.pm Perl , you can install the missing module using:
yum install perl-Time-HiRes

To can install Bundle::LWP

Use:

perl -MCPAN -e 'install Bundle::LWP'

If you get "Can't locate CPAN.pm in @INC" <- click here

If you get this error you have to install CPAN.
Use:
yum install cpan

When you install CSF  firewall you my have this error.
*WARNING* URLGET set to use LWP but perl module is not installed
csf and lfd are not disabled!

To fix this install perl-libwww using:
yum install -y perl-libwww

Step 1
yum install psmisc net-tools systemd-devel libdb-devel perl-DBI xfsprogs

Step 2
wget http://www.directadmin.com/setup.sh

Set Chmod
chmod 755 setup.sh

Step3 
Execute
./setup.sh

To restart CentOS network use:
systemctl restart network