PrestaShop 1.7 Database Structure
Here are descriptions of the database tables in PrestaShop v1.7. By default, each table has a prefix of ps_
. When installing PrestaShop, there is an option to change this prefix. This allows PrestaShop to be installed multiple times in the same database and helps to prevent table name conflicts with other shopping carts installed in the same database.
The table names are all lowercase and use underscores between words, and include the types of objects in the table. For example, the ps_product
table contains all the product information. Tables that end with _lang
contain translations for the object. For example, ps_product_lang
contains product translations.
When a table links together two types of objects, both objects are included in the table name. For example, ps_category_product
links products to categories. The ID of each table starts with id_
followed by the object name. For example, the ID of the ps_product
table is id_product
.
Here are the core database tables installed by PrestaShop:
Table Name | Description | Primary Key |
access | The employee profile permissions | id_profile, id_tab |
accessory | Product accessories | id_product_1, id_product_2 |
address | Customer, manufacturer and supplier addresses | id_address |
address_format | Address format for each country | id_country |
admin_filter | Back Office employee filters | id |
alias | Search keyword alias | id_alias |
attachment | Product attachments | id_attachment |
attachment_lang | Product attachment names and descriptions | id_attachment, id_lang |
attribute | Product attributes | id_attribute |
attribute_group | Product attribute groups | id_attribute_group |
attribute_group_lang | Product attribute group names | id_attribute_group, id_lang |
attribute_group_shop | Product attribute group shop associations | id_attribute_group, id_shop |
attribute_impact | Product attribute price and weight impacts | id_attribute_impact |
attribute_lang | Product attribute names | id_attribute, id_lang |
attribute_shop | Product attribute shop associations | id_attribute, id_shop |
authorization_role | Back Office employee permissions | id_authorization_role |
carrier | Carriers | id_carrier |
carrier_group | Carrier customer group restrictions | id_carrier, id_group |
carrier_lang | Carrier transit time messages | id_carrier |
carrier_shop | Carrier shop associations | id_carrier, id_shop |
carrier_tax_rules_group_shop | Carrier tax rule shop associations | id_carrier, id_tax_rules_group, id_shop |
carrier_zone | Zones each carrier is available | id_carrier, id_zone |
cart | Customer and guest carts | id_cart |
cart_cart_rule | Voucher codes used in carts (v1.5 and later) | id_cart, id_cart_rule |
cart_product | Products in customer carts | id_cart, id_product, id_product_attribute |
cart_rule | Vouchers | id_cart_rule |
cart_rule_carrier | Voucher carrier associations | id_cart_rule, id_carrier |
cart_rule_combination | Allowed voucher combinations | id_cart_rule_1, id_cart_rule_2 |
cart_rule_country | Voucher country associations | id_cart_rule, id_country |
cart_rule_group | Voucher group associations | id_cart_rule, id_group |
cart_rule_lang | Voucher names | id_cart_rule, id_lang |
cart_rule_product_rule | Voucher condition types | id_product_rule |
cart_rule_product_rule_group | Voucher quantities | id_product_rule_group |
cart_rule_product_rule_value | Voucher condition items | id_product_rule, id_item |
cart_rule_shop | Voucher shop associations | id_cart_rule, id_shop |
category | Product categories | id_category |
category_group | Product category customer group restrictions | id_category, id_group |
category_lang | Product category names and descriptions | id_category, id_lang |
category_product | Products in each category | id_category, id_product |
category_shop | Category shop associations | id_category, id_shop |
cms | CMS pages | id_cms |
cms_category | CMS categories | id_cms_category |
cms_category_lang | CMS category names | id_cms_category, id_lang |
cms_category_shop | CMS category shop associations | id_cms_category, id_shop |
cms_lang | CMS page content | id_cms, id_lang |
cms_role | CMS page roles | id_cms_role, id_cms |
cms_role_lang | CMS page role translations | id_cms_role, id_lang, id_shop |
cms_shop | CMS page shop associations | id_cms, id_shop |
configuration | Configuration settings | id_configuration |
configuration_kpi | Back Office tab stats (key performance indicators) | id_configuration_kpi |
configuration_kpi_lang | Back Office tab stats translations | id_configuration_kpi, id_lang |
connections | Visitor IP addresses, referrers and pages visited | id_connections |
connections_page | Start and end times of page visits | id_connections, id_page, time_start |
connections_source | Visitor referrers and search engine keywords | id_connections_source |
contact | Contact form subjects | id_contact |
contact_lang | Contact form subject names | id_contact, id_lang |
contact_shop | Contact form subject name shop associations | id_contact, id_shop |
country | Countries | id_country |
country_lang | Country names | id_country, id_lang |
country_shop | Country shop associations | id_country, id_shop |
currency | Currencies | id_currency |
currency_shop | Currency shop associations | id_currency, id_shop |
customer | Customers | id_customer |
customer_group | Customer groups | id_customer, id_group |
customer_message | Customer messages through contact form | id_customer_message |
customer_message_sync_imap | MD5 hashes of read customer messages | |
customer_thread | Threads of messages through contact form | id_customer_thread |
customization | Customised product data in cart | id_customization, id_cart, id_product |
customization_field | Product customisation fields | id_customization_field |
customization_field_lang | Product customisation field names | id_customization_field, id_lang |
customized_data | Customised product data entered by customers | id_customization, type, index |
date_range | Page view date ranges | id_date_range |
delivery | Carrier delivery prices | id_delivery |
employee | Back Office employees | id_employee |
employee_shop | Back Office employee shop associations | id_employee, id_shop |
feature | Product features | id_feature |
feature_lang | Product feature names | id_feature, id_lang |
feature_product | Links feature values to products | id_feature, id_product |
feature_shop | Product feature name shop associations | id_feature, id_shop |
feature_value | Product feature values | id_feature_value |
feature_value_lang | Product feature value names | id_feature_value, id_lang |
gender | Customer titles (Mr., Mrs., Miss) | id_gender |
gender_lang | Customer title names | id_gender, id_lang |
group | Customer groups and reductions | id_group |
group_lang | Customer group names | id_group, id_lang |
group_reduction | Customer group category reductions | id_group_reduction |
group_shop | Customer group shop associations | id_group, id_shop |
guest | Guests | id_guest |
hook | Module hook names and descriptions | id_hook |
hook_alias | Module hook aliases | id_hook_alias |
hook_module | Position of modules in each hook | id_module, id_hook |
hook_module_exceptions | Page exceptions for each module | id_hook_module_exceptions |
image | Product images | id_image |
image_lang | Product image legends | id_image, id_lang |
image_shop | Product image shop associations | id_image, id_shop |
image_type | Product image thumbnail sizes | id_image_type |
import_match | Saved CSV import configurations | id_import_match |
lang | Languages | id_lang |
lang_shop | Language shop associations | id_lang, id_shop |
log | Log of PHP errors and warnings | id_log |
Log of emails sent | id_mail | |
manufacturer | Manufacturers | id_manufacturer |
manufacturer_lang | Manufacturer descriptions | id_manufacturer, id_lang |
manufacturer_shop | Manufacturer shop associations | id_manufacturer, id_shop |
memcached_servers | Memcached servers | id_memcached_server |
message | Order messages | id_message |
message_readed | Order messages that have been marked as read | id_message, id_employee |
meta | Page names | id_meta |
meta_lang | Page meta information | id_meta, id_lang |
module | Modules directories | id_module |
module_access | Employee module permissions | id_profile, id_module |
module_country | Module country restrictions | id_module, id_country |
module_currency | Module currency restrictions | id_module, id_currency |
module_group | Module customer group restrictions | id_module, id_group |
module_preference | Employee favourite modules | id_module, id_group |
module_shop | Module shop associations | id_module, id_shop |
operating_system | Recognised operating systems | id_operating_system |
orders | Orders | id_order |
order_carrier | Order carrier cost and tracking number | id_order_carrier |
order_cart_rule | Order vouchers | id_order |
order_detail | Order products | id_order_detail |
order_detail_tax | Order product tax information | |
order_history | Order status history | id_order_history |
order_invoice | Order invoice information | id_order_invoice |
order_invoice_payment | Order invoice payments | id_order_invoice, id_order_payment |
order_invoice_tax | Order invoice tax information | |
order_message | Predefined order messages | id_order_message |
order_message_lang | Predefined order message names | id_order_message, id_lang |
order_payment | Order payment information | id_order_payment |
order_return | Merchandise returns | id_order_return |
order_return_detail | Merchandise return products | id_order_return, id_order_detail, id_customization |
order_return_state | Merchandise return statuses | id_order_return_state |
order_return_state_lang | Merchandise return status names | id_order_return_state, id_lang |
order_slip | Credit slips | id_order_slip |
order_slip_detail | Credit slip products | id_order_slip, id_order_detail |
order_slip_detail_tax | Order slip tax | |
order_state | Order statuses | id_order_state |
order_state_lang | Order status names | id_order_state, id_lang |
pack | Product packs | id_product_pack, id_product_item |
page | Pages | id_page |
page_type | Page names | id_page_type |
page_viewed | Viewed pages | id_page, id_date_range |
product | Product information | id_product |
product_attachment | Product information | id_product |
product_attribute | Product attribute information | id_product_attribute |
product_attribute_combination | Product attribute combinations | id_attribute, id_product_attribute |
product_attribute_image | Product attribute images | id_product_attribute, id_image |
product_attribute_shop | Product attribute shop associations | id_product_attribute, id_shop |
product_carrier | Product carrier associations | id_product, id_carrier_reference, id_shop |
product_country_tax | Product country taxes | id_product, id_country, id_tax |
product_download | Downloadable products | id_product_download |
product_group_reduction_cache | Product customer group reductions | id_product, id_group |
product_lang | Product names and descriptions | id_product, id_lang |
product_sale | Product sale data | id_product |
product_shop | Product shop associations | id_product, id_shop |
product_supplier | Product supplier associations | id_product_supplier |
product_tag | Product tags | id_product, id_tag |
profile | Employee profile | id_profile |
profile_lang | Employee profile name | id_profile, id_lang |
quick_access | Back Office quick accesses | id_quick_access |
quick_access_lang | Back Office quick access names | id_quick_access, id_lang |
range_price | Carrier price ranges | id_range_price |
range_weight | Carrier weight ranges | id_range_weight |
referrer | Affiliate program accounts | id_referrer |
referrer_cache | Affiliate program referrals | id_connections_source, id_referrer |
referrer_shop | Affiliate program shop associations | id_referrer, id_shop |
request_sql | Saved SQL queries | id_request_sql |
required_field | Required fields | id_required_field |
risk | Risk level colours | id_risk |
risk_lang | Risk level names | id_risk, id_lang |
search_engine | Recognised search engines | id_search_engine |
search_index | PrestaShop search engine keyword index | id_product, id_word |
search_word | PrestaShop search engine keywords | id_word |
shop | Shops | id_shop |
shop_group | Shop groups | id_shop_group |
shop_url | Shop URLs | id_shop_url |
smarty_cache | Smarty cache | id_smarty_cache |
smarty_last_flush | Smarty cache last flush times | type |
smarty_lazy_cache | Smarty lazy cache | template_hash, cache_id, compile_id |
specific_price | Specific prices | id_specific_price |
specific_price_priority | Specific price priorities | id_specific_price_priority, id_product |
specific_price_rule | Specific price rules | id_specific_price_rule |
specific_price_rule_condition | Specific price rule types | id_specific_price_rule_condition |
specific_price_rule_condition_group | Specific price rule conditions | id_specific_price_rule_condition_group, id_specific_price_rule |
state | States | id_state |
stock | Warehouse stock quantities | id_stock |
stock_available | Available warehouse stock quantities | id_stock_available |
stock_mvt | Stock movements | id_stock_mvt |
stock_mvt_reason | Stock movement reasons | id_stock_mvt_reason |
stock_mvt_reason_lang | Stock movement reason names | id_stock_mvt_reason, id_lang |
store | Store addresses | id_store |
store_shop | Store address shop associations | id_store, id_shop |
supplier | Suppliers | id_supplier |
supplier_lang | Supplier names | id_supplier, id_lang |
supplier_shop | Supplier shop associations | id_supplier, id_shop |
supply_order | Warehouse supply orders | id_supply_order |
supply_order_detail | Warehouse supply order products | id_supply_order_detail |
supply_order_history | Warehouse supply order status history | id_supply_order_history |
supply_order_receipt_history | Warehouse supply order receipt history | id_supply_order_receipt_history |
supply_order_state | Warehouse supply order statuses | id_supply_order_state |
supply_order_state_lang | Warehouse supply order status names | id_supply_order_state, id_lang |
tab | Back Office tabs | id_tab |
tab_lang | Back Office tab names | id_tab, id_lang |
tab_module_preference | Employee Back Office tab module override preferences | id_tab, id_tab_module_preference |
tag | Product tags used in tag cloud | id_tag |
tag_count | Customer group product tag counts | id_group, id_tag |
tax | Taxes | id_tax |
tax_lang | Tax names | id_tax, id_lang |
tax_rule | Tax rules | id_tax_rule |
tax_rules_group | Tax rule names | id_tax_rules_group |
tax_rules_group_shop | Tax rule shop associations | id_tax_rules_group, id_shop |
timezone | Timezones | id_timezone |
warehouse | Warehouses | id_warehouse |
warehouse_carrier | Warehouse carrier associations | id_carrier, id_warehouse |
warehouse_product_location | Warehouse product locations | id_carrier, id_warehouse_product_location |
warehouse_shop | Warehouse shop associations | id_shop, id_warehouse |
webservice_account | Webservice accounts | id_webservice_account |
webservice_account_shop | Webservice account shop associations | id_webservice_account, id_shop |
webservice_permission | Webservice permissions | id_webservice_permission |
web_browser | Recognised web browsers | id_web_browser |
zone | Carrier zones | id_zone |
zone_shop | Carrier zone shop associations | id_zone, id_shop |
Depending on which PrestaShop modules are installed, the following tables may also exist:
Table Name | Description | Primary Key |
aeuc_cmsrole_email | Legal Compliance email templates with terms and conditions | id |
aeuc_email | Legal Compliance email templates | id_mail |
emailsubscription | Newsletter Subscription subscriptions | id |
homeslider | Image Slider shop associations | id_homeslider_slides, id_shop |
homeslider_slides | Image Slider slides | id_homeslider_slides |
homeslider_slides_lang | Image Slider slide titles, descriptions and URLs | id_homeslider_slides, id_lang |
info | Custom Text Blocks block | id_info |
info_lang | Custom Text Blocks translations | id_info, id_lang |
layered_category | Faceted Search filters | id_layered_category |
layered_filter | Facted Search templates | |
layered_filter_shop | Facted Search template shop associations | id_layered_filter, id_shop |
layered_friendly_url | Facted Search friendly URLs | id_layered_friendly_url |
layered_indexable_attribute_group | Facted Search indexable attribute groups | id_attribute_group |
layered_indexable_attribute_group_lang_value | Facted Search attribute group URLs and metatitles | id_attribute_group, id_lang |
layered_indexable_attribute_lang_value | Facted Search attribute URLs and meta-titles | id_attribute, id_lang |
layered_indexable_feature | Facted Search indexable features | id_feature |
layered_indexable_feature_lang_value | Facted Search feature URLs and metatitles | id_feature, id_lang |
layered_indexable_feature_value_lang_value | Facted Search feature value URLs and metatitles | id_feature_value, id_lang |
layered_price_index | Facted Search minimum and maximum price index | id_product, id_currency, id_shop |
layered_product_attribute | Facted Search product attributes | id_attribute, id_product, id_shop |
link_block | Link List blocks | id_link_block |
link_block_lang | Link List block titles | id_link_block, id_lang |
link_block_shop | Link List block shop associations | id_link_block, id_shop |
linksmenutop | Main Menu links | id_linksmenutop |
linksmenutop_lang | Main Menu link translations | |
pagenotfound | Page not found data | id_pagenotfound |
reassurance | Customer Reassurance Block images | id_reinsurance |
reinsurance_lang | Customer Reassurance Block text | id_reinsurance, id_lang |
sekeyword | External search engine keywords | id_sekeyword |
statssearch | PrestaShop search engine statistics | id_statssearch |