How To Delete Magento 2.x Products

There are following below Magento 2 Database SQL query need to run.

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE catalog_category_entity;
TRUNCATE TABLE catalog_category_entity_int;
TRUNCATE TABLE catalog_category_entity_varchar;
TRUNCATE TABLE cataloginventory_stock_item;
TRUNCATE TABLE cataloginventory_stock_status;
TRUNCATE TABLE cataloginventory_stock_status_idx;
TRUNCATE TABLE cataloginventory_stock_status_tmp;
TRUNCATE TABLE catalog_category_product;
TRUNCATE TABLE catalog_category_product_index;
TRUNCATE TABLE catalog_category_product_index_tmp;
TRUNCATE TABLE catalog_compare_item;
TRUNCATE TABLE catalog_product_bundle_option;
TRUNCATE TABLE catalog_product_bundle_option_value;
TRUNCATE TABLE catalog_product_bundle_price_index;
TRUNCATE TABLE catalog_product_bundle_selection;
TRUNCATE TABLE catalog_product_bundle_selection_price;
TRUNCATE TABLE catalog_product_bundle_stock_index;
TRUNCATE TABLE catalog_product_entity;
TRUNCATE TABLE catalog_product_entity_datetime;
TRUNCATE TABLE catalog_product_entity_decimal;
TRUNCATE TABLE catalog_product_entity_gallery;
TRUNCATE TABLE catalog_product_entity_int;
TRUNCATE TABLE catalog_product_entity_media_gallery;
TRUNCATE TABLE catalog_product_entity_media_gallery_value;
TRUNCATE TABLE catalog_product_entity_media_gallery_value_to_entity;
TRUNCATE TABLE catalog_product_entity_media_gallery_value_video;
TRUNCATE TABLE catalog_product_entity_text;
TRUNCATE TABLE catalog_product_entity_tier_price;
TRUNCATE TABLE catalog_product_entity_varchar;
TRUNCATE TABLE catalog_product_index_eav;
TRUNCATE TABLE catalog_product_index_eav_decimal;
TRUNCATE TABLE catalog_product_index_eav_decimal_idx;
TRUNCATE TABLE catalog_product_index_eav_decimal_tmp;
TRUNCATE TABLE catalog_product_index_eav_idx;
TRUNCATE TABLE catalog_product_index_eav_tmp;
TRUNCATE TABLE catalog_product_index_price;
TRUNCATE TABLE catalog_product_index_price_bundle_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_opt_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_bundle_sel_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_sel_tmp;
TRUNCATE TABLE catalog_product_index_price_bundle_tmp;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_agr_idx;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_agr_tmp;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_idx;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_downlod_idx;
TRUNCATE TABLE catalog_product_index_price_downlod_tmp;
TRUNCATE TABLE catalog_product_index_price_final_idx;
TRUNCATE TABLE catalog_product_index_price_final_tmp;
TRUNCATE TABLE catalog_product_index_price_idx;
TRUNCATE TABLE catalog_product_index_price_opt_agr_idx;
TRUNCATE TABLE catalog_product_index_price_opt_agr_tmp;
TRUNCATE TABLE catalog_product_index_price_opt_idx;
TRUNCATE TABLE catalog_product_index_price_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_tmp;
TRUNCATE TABLE catalog_product_index_tier_price;
TRUNCATE TABLE catalog_product_index_website;
TRUNCATE TABLE catalog_product_link;
TRUNCATE TABLE catalog_product_link_attribute_decimal;
TRUNCATE TABLE catalog_product_link_attribute_int;
TRUNCATE TABLE catalog_product_link_attribute_varchar;
TRUNCATE TABLE catalog_product_option;
TRUNCATE TABLE catalog_product_option_price;
TRUNCATE TABLE catalog_product_option_title;
TRUNCATE TABLE catalog_product_option_type_price;
TRUNCATE TABLE catalog_product_option_type_title;
TRUNCATE TABLE catalog_product_option_type_value;
TRUNCATE TABLE catalog_product_relation;
TRUNCATE TABLE catalog_product_super_attribute;
TRUNCATE TABLE catalog_product_super_attribute_label;
TRUNCATE TABLE catalog_product_super_link;
TRUNCATE TABLE catalog_product_website;
TRUNCATE TABLE catalog_url_rewrite_product_category;
TRUNCATE TABLE downloadable_link;
TRUNCATE TABLE downloadable_link_price;
TRUNCATE TABLE downloadable_link_purchased;
TRUNCATE TABLE downloadable_link_purchased_item;
TRUNCATE TABLE downloadable_link_title;
TRUNCATE TABLE downloadable_sample;
TRUNCATE TABLE downloadable_sample_title;
TRUNCATE TABLE product_alert_price;
TRUNCATE TABLE product_alert_stock;
TRUNCATE TABLE report_compared_product_index;
TRUNCATE TABLE report_viewed_product_aggregated_daily;
TRUNCATE TABLE report_viewed_product_aggregated_monthly;
TRUNCATE TABLE report_viewed_product_aggregated_yearly;
TRUNCATE TABLE report_viewed_product_index;

INSERT INTO catalog_category_entity
  (entity_id,attribute_set_id,parent_id,created_at,updated_at,path,POSITION,level,children_count) 
VALUES 
  (1,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),
  (2,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
 
INSERT INTO catalog_category_entity_int
  (value_id,attribute_id,store_id,entity_id,value) 
VALUES 
  (1,32,0,2,1),
  (2,32,1,2,1);
 
INSERT INTO catalog_category_entity_varchar
  (value_id,attribute_id,store_id,entity_id,value) 
VALUES 
  (1,31,0,1,'Root Catalog'),
  (2,33,0,1,'root-catalog'),
  (3,31,0,2,'Default Category'),
  (4,39,0,2,'PRODUCTS'),
  (5,33,0,2,'default-category');

SET FOREIGN_KEY_CHECKS = 1;

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 database tables store Product details


Which Magento 2 database tables store Category details


How To Delete Magento 2 Categories & Products in Magento 2


Which Magento 2 Database Table Store Bundles Product


Which Magento 2 Database Table Having All Catalog (Categories & Products) URLs Rewrite Storage Data


Which Magento 2 Database Tables Store Product Attributes


How To Delete Magento 2 Categories


How To Delete Magento 2 Categories & Products in Magento 2


Which Magento 2 Database Table Store Customer Group Price of products


Which Magento 2 Database Table Store Products Special Discount Price

How To Delete Magento 2.x Categories

There are following below Magento 2 Database SQL query need to run.



SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE catalog_category_entity;
TRUNCATE TABLE catalog_category_entity_int;
TRUNCATE TABLE catalog_category_entity_varchar;
TRUNCATE TABLE cataloginventory_stock_item;
TRUNCATE TABLE cataloginventory_stock_status;
TRUNCATE TABLE cataloginventory_stock_status_idx;
TRUNCATE TABLE cataloginventory_stock_status_tmp;
TRUNCATE TABLE catalog_category_product;
TRUNCATE TABLE catalog_category_product_index;
TRUNCATE TABLE catalog_category_product_index_tmp;
TRUNCATE TABLE catalog_compare_item;
TRUNCATE TABLE catalog_product_bundle_option;
TRUNCATE TABLE catalog_product_bundle_option_value;
TRUNCATE TABLE catalog_product_bundle_price_index;
TRUNCATE TABLE catalog_product_bundle_selection;
TRUNCATE TABLE catalog_product_bundle_selection_price;
TRUNCATE TABLE catalog_product_bundle_stock_index;
TRUNCATE TABLE catalog_product_entity;
TRUNCATE TABLE catalog_product_entity_datetime;
TRUNCATE TABLE catalog_product_entity_decimal;
TRUNCATE TABLE catalog_product_entity_gallery;
TRUNCATE TABLE catalog_product_entity_int;
TRUNCATE TABLE catalog_product_entity_media_gallery;
TRUNCATE TABLE catalog_product_entity_media_gallery_value;
TRUNCATE TABLE catalog_product_entity_media_gallery_value_to_entity;
TRUNCATE TABLE catalog_product_entity_media_gallery_value_video;
TRUNCATE TABLE catalog_product_entity_text;
TRUNCATE TABLE catalog_product_entity_tier_price;
TRUNCATE TABLE catalog_product_entity_varchar;
TRUNCATE TABLE catalog_product_index_eav;
TRUNCATE TABLE catalog_product_index_eav_decimal;
TRUNCATE TABLE catalog_product_index_eav_decimal_idx;
TRUNCATE TABLE catalog_product_index_eav_decimal_tmp;
TRUNCATE TABLE catalog_product_index_eav_idx;
TRUNCATE TABLE catalog_product_index_eav_tmp;
TRUNCATE TABLE catalog_product_index_price;
TRUNCATE TABLE catalog_product_index_price_bundle_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_opt_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_bundle_sel_idx;
TRUNCATE TABLE catalog_product_index_price_bundle_sel_tmp;
TRUNCATE TABLE catalog_product_index_price_bundle_tmp;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_agr_idx;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_agr_tmp;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_idx;
TRUNCATE TABLE catalog_product_index_price_cfg_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_downlod_idx;
TRUNCATE TABLE catalog_product_index_price_downlod_tmp;
TRUNCATE TABLE catalog_product_index_price_final_idx;
TRUNCATE TABLE catalog_product_index_price_final_tmp;
TRUNCATE TABLE catalog_product_index_price_idx;
TRUNCATE TABLE catalog_product_index_price_opt_agr_idx;
TRUNCATE TABLE catalog_product_index_price_opt_agr_tmp;
TRUNCATE TABLE catalog_product_index_price_opt_idx;
TRUNCATE TABLE catalog_product_index_price_opt_tmp;
TRUNCATE TABLE catalog_product_index_price_tmp;
TRUNCATE TABLE catalog_product_index_tier_price;
TRUNCATE TABLE catalog_product_index_website;
TRUNCATE TABLE catalog_product_link;
TRUNCATE TABLE catalog_product_link_attribute_decimal;
TRUNCATE TABLE catalog_product_link_attribute_int;
TRUNCATE TABLE catalog_product_link_attribute_varchar;
TRUNCATE TABLE catalog_product_option;
TRUNCATE TABLE catalog_product_option_price;
TRUNCATE TABLE catalog_product_option_title;
TRUNCATE TABLE catalog_product_option_type_price;
TRUNCATE TABLE catalog_product_option_type_title;
TRUNCATE TABLE catalog_product_option_type_value;
TRUNCATE TABLE catalog_product_relation;
TRUNCATE TABLE catalog_product_super_attribute;
TRUNCATE TABLE catalog_product_super_attribute_label;
TRUNCATE TABLE catalog_product_super_link;
TRUNCATE TABLE catalog_product_website;
TRUNCATE TABLE catalog_url_rewrite_product_category;
TRUNCATE TABLE downloadable_link;
TRUNCATE TABLE downloadable_link_price;
TRUNCATE TABLE downloadable_link_purchased;
TRUNCATE TABLE downloadable_link_purchased_item;
TRUNCATE TABLE downloadable_link_title;
TRUNCATE TABLE downloadable_sample;
TRUNCATE TABLE downloadable_sample_title;
TRUNCATE TABLE product_alert_price;
TRUNCATE TABLE product_alert_stock;
TRUNCATE TABLE report_compared_product_index;
TRUNCATE TABLE report_viewed_product_aggregated_daily;
TRUNCATE TABLE report_viewed_product_aggregated_monthly;
TRUNCATE TABLE report_viewed_product_aggregated_yearly;
TRUNCATE TABLE report_viewed_product_index;

INSERT INTO catalog_category_entity
  (entity_id,attribute_set_id,parent_id,created_at,updated_at,path,POSITION,level,children_count) 
VALUES 
  (1,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),
  (2,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
 
INSERT INTO catalog_category_entity_int
  (value_id,attribute_id,store_id,entity_id,value) 
VALUES 
  (1,32,0,2,1),
  (2,32,1,2,1);
 
INSERT INTO catalog_category_entity_varchar
  (value_id,attribute_id,store_id,entity_id,value) 
VALUES 
  (1,31,0,1,'Root Catalog'),
  (2,33,0,1,'root-catalog'),
  (3,31,0,2,'Default Category'),
  (4,39,0,2,'PRODUCTS'),
  (5,33,0,2,'default-category');

SET FOREIGN_KEY_CHECKS = 1;

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 database tables store Product details


Which Magento 2 database tables store Category details


How To Delete Magento 2 Categories & Products in Magento 2


Which Magento 2 Database Table Store Bundles Product


Which Magento 2 Database Table Having All Catalog (Categories & Products) URLs Rewrite Storage Data


Which Magento 2 Database Tables Store Product Attributes


How To Delete Magento 2 Products


How To Delete Magento 2 Categories & Products in Magento 2


Which Magento 2 Database Table Store Customer Group Price of products


Which Magento 2 Database Table Store Products Special Discount Price

exception(s):Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file

While running Magento 2.x & displaying Invalid template file error as below

exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp/htdocs/magento2/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's n

Solution: There are following below steps need to follow

[1] – Find validateURLScheme function in below Path vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96

[2] – Replace function with this: !file_exists($filename)

private function validateURLScheme(string $filename) : bool
{
	if(!file_exists($filename)) { // if file not exist
		$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
		$url = parse_url($filename);
		if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) {
			return false;
		}
	}

	return true;
}

[3] – Finally Magento 2.x Invalid template issue will be resolved & site will be run properly.

Which Magento 2.x Database Tables Having All URLs Storage

There are following below Magento 2 Database Table having all URLs storage

url_rewrite

This table having all Magento 2 URLs for front pages as well as admin pages

  • Catalog URLs (Categories & Products)
  • PDP URLs
  • PLP URLs
  • CMS Pages URLs
  • Customers Profile & My Account URLs
  • Customer Login, Registration, Forget Password, Change Password
  • Cart & Checkout Pages
  • Shipping & Payment Pages
  • Payment Success Page
  • All Admin Pages URLs
  • many more …..

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Review


Which Magento 2 Database Tables Store Customer Wishlist Products


Which Magento 2 Database Table Store Patches


Which Magento 2 Database Table Store Static Blocks & Its Details


Which Magento 2 Database Table Store CMS Pages & Its Details


Which Magento 2 Database Tables Having All URLs Storage


Which Magento 2.x Database Tables Store Customer Wishlist Products

There are following below set of Magento 2 Database Tables store Customer’s Wishlist Products

wishlist -> Store the wishlists created by customers
wishlist_item -> Store the items added to the wishlists, including the product id and other item details
wishlist_item_option -> Store the options selected for the wishlist items
email_wishlist -> Store wishlist customer’s email

Magento 2 All Database Tables [500 & more Tables]


Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Review


Which Magento 2 Database Tables Store Customer Wishlist Products


Which Magento 2 Database Table Store Patches


Which Magento 2 Database Table Store Static Blocks & Its Details


Which Magento 2 Database Table Store CMS Pages & Its Details


Which Magento 2 Database Tables Having All URLs Storage


Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes)

While Installing Magento 2 by using Composer & trying to run composer update command as below image.

or

Solution:: To resolve this issue, there are following below setting need to do in php.ini file.

Go to [PHP configuration file PHP.INI File]] & do following
below changes & restart server

max_execution_time = 5000
max_input_time = 5000
memory_limit = 2G
post_max_size = 900M
upload_max_filesize = 900

Once required PHP Settings has been done, need to run composer update again & it will be run successfully.

For my.ini changes
Path= xampp\mysql\bin\my.ini [Default format below]

key_buffer=16M
max_allowed_packet=1M
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M

After changes

key_buffer=80M
max_allowed_packet=10M
sort_buffer_size=4M
net_buffer_length=64K
read_buffer_size=1M
read_rnd_buffer_size=2M
myisam_sort_buffer_size=32M


Magento 2.x Installation at 51% Error: (Wrong file in Gd2.php:64) Module ‘Magento_Theme’

While Installation Magento 2.3.x or Magento 2.4.x in Windows 10 Machine & getting below error.

Solution:: There are following below steps need to follow

[1] – Find validateURLScheme function in Path vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96.

[2] – Replace function with this: !file_exists($filename)

private function validateURLScheme(string $filename) : bool
{
	if(!file_exists($filename)) { // if file not exist
		$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
		$url = parse_url($filename);
		if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) {
			return false;
		}
	}

	return true;
}

Which Magento 2.x Database Tables Store Customer Review

There are following below set of Magento 2 Database tables store Customer Review Data for products.

review
review_detail
review_entity
review_entity_summary
review_status
review_store

Magento 2 All Database Tables [500 and more Tables]

Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Review


Which Magento 2 Database Tables Store Customer Wishlist Products


Which Magento 2 Database Table Store Patches


Which Magento 2 Database Table Store Static Blocks & Its Details


Which Magento 2 Database Table Store CMS Pages & Its Details


Which Magento 2 Database Tables Having All URLs Storage


Which Magento 2.x Database Tables Store Customer Rating

There are following below set of Magento 2 Database Tables having Custom Rating Data for Products.

rating_entity
rating_option
rating_option_vote
rating_option_vote_aggregated
rating_store
rating_title

Magento 2 All Database Tables [500 and more Tables]

Which Magento 2 database table store customer’s Email Data


Which Magento 2 Database Table Store Customer Newsletter Data


Which Magento 2 database table store customer’s shipping and billing address


How To Remove Sales Order Data & Customer Data in Magento 2


Which Magento 2 Database Tables Store Customer Rating


Which Magento 2 Database Tables Store Customer Review


Which Magento 2 Database Tables Store Customer Wishlist Products


Which Magento 2 Database Table Store Patches


Which Magento 2 Database Table Store Static Blocks & Its Details


Which Magento 2 Database Table Store CMS Pages & Its Details


Which Magento 2 Database Tables Having All URLs Storage