SlideShare a Scribd company logo
Understanding
WordPress/WooCommerce
Database
George Georgopoulos, Papaki
Full Stack Web Developer & WP enthusiast
https://github.com/ggeorg0p
Heraklion
10/12/2016
Introduction
● High Level approach
● No Multisite
● No Optimization
● Outline
○ WordPress Core
■ General Architecture
■ Table Structure
○ WooCommerce DB
https://codex.wordpress.org/File:WP4.4.2-ERD.png
General Architecture [WP 4.6.1]
● MySQL version >=5.6 OR MariaDB version >=10.0
● Default prefix: “wp_”
● 12 tables
● Table “wp_links” no longer used in core
● Hybrid entity/object-oriented and key-value store
● Unique IDs (primary key: bigint[20] unsigned) for each entity within a table
(Post/User/Comment/Term ID)
Table Structure [WP 4.6.1]
● wp_{object}s tables
○ Main tables are modelled after the object they are storing:
■ wp_posts
■ wp_comments
■ wp_users
■ wp_terms
● wp_{object}meta tables
○ Each object type has a key-value meta store:
■ wp_postmeta
■ wp_usermeta
■ wp_commentmeta
■ wp_termmeta
Table Structure [WP 4.6.1]
● Key/Value Store (“NoSQL” like)
● A bit like a dynamic dictionary, in table form
● Values relating to objects are identified by a key
● key can be any valid varchar(255); value can be any primitive or serializable
object (PHP serialize function).
● WP_OPTIONS
○ option_id bigint(20)
○ option_name varchar(64) <= key
○ option_value longtext <= value
○ autoload varchar(20)
Table Structure [WP 4.6.1]
Terms, Term Taxonomies, and Term Relationships
● Legacy Issues
● wp_terms/wp_termmeta: the Term Object/Data
● wp_term_taxonomy: Taxonomy Assignment
● wp_term_relationships: Object relationships
○ object_id
○ term_taxonomy_id
○ term_order
WooCommerce [2.6.8]
● Uses Core WP tables for products, coupons, orders, and webhooks
● wp_posts/wp_postmeta/taxonomies
● Vertical structure (Horizontal coming in version 3)
Custom tables
(“wp_” prefix)
woocommerce_sessions woocommerce_tax_rate_locations
woocommerce_api_keys woocommerce_shipping_zones
woocommerce_attribute_taxonomies woocommerce_shipping_zone_locations
woocommerce_tax_rates woocommerce_shipping_zone_methods
woocommerce_order_items woocommerce_payment_tokens
woocommerce_order_itemmeta woocommerce_payment_tokenmeta
woocommerce_downloadable_product_permissions
Thank You :)
Any Questions?
George Georgopoulos, Papaki
Full Stack Web Developer & WP enthusiast
https://github.com/ggeorg0p

More Related Content

Viewers also liked

Italiasicura_24_10_2016_Bologna
Italiasicura_24_10_2016_BolognaItaliasicura_24_10_2016_Bologna
Italiasicura_24_10_2016_Bologna
Giovanni Menduni
 
Digitalsummit2016 brooklynbrothersspeakersession-160929154502
Digitalsummit2016 brooklynbrothersspeakersession-160929154502Digitalsummit2016 brooklynbrothersspeakersession-160929154502
Digitalsummit2016 brooklynbrothersspeakersession-160929154502
Dr Lila Malliari
 
ramCV
ramCVramCV
Resume 2016
Resume 2016Resume 2016
Resume 2016
Cheryl Roebuck
 
Bài giảng thiết kế website - truongkinhtethucpham.com
Bài giảng thiết kế website - truongkinhtethucpham.comBài giảng thiết kế website - truongkinhtethucpham.com
Bài giảng thiết kế website - truongkinhtethucpham.com
mai_non
 
first Michi
first Michifirst Michi
first Michi
Dawa Sherpa
 
Early warning through camera-based vital signs monitoring
Early warning through camera-based vital signs monitoring Early warning through camera-based vital signs monitoring
Early warning through camera-based vital signs monitoring
Health Innovation Wessex
 
Networking 101
Networking 101Networking 101
Networking 101
Global Institute GIPPEC
 
The New Normal in B.C. Hockey
The New Normal in B.C. HockeyThe New Normal in B.C. Hockey
The New Normal in B.C. Hockey
ActiveforLife
 
Servicios Logísticos Gala Capilla, S.L.
Servicios Logísticos Gala Capilla, S.L.Servicios Logísticos Gala Capilla, S.L.
Servicios Logísticos Gala Capilla, S.L.
Vicente Gala Capilla
 
Conventions of a thriller group peice
Conventions of a thriller group peice Conventions of a thriller group peice
Conventions of a thriller group peice
JackyBoi1998
 
Corn er houët
Corn er houëtCorn er houët
Corn er houët
Benoît Browaeys
 
Car Rental Companies In Qatar
Car Rental Companies In  QatarCar Rental Companies In  Qatar
Car Rental Companies In Qatar
qatpedia
 
جيل واعد
جيل واعد  جيل واعد
جيل واعد
Samed Mohammad
 

Viewers also liked (14)

Italiasicura_24_10_2016_Bologna
Italiasicura_24_10_2016_BolognaItaliasicura_24_10_2016_Bologna
Italiasicura_24_10_2016_Bologna
 
Digitalsummit2016 brooklynbrothersspeakersession-160929154502
Digitalsummit2016 brooklynbrothersspeakersession-160929154502Digitalsummit2016 brooklynbrothersspeakersession-160929154502
Digitalsummit2016 brooklynbrothersspeakersession-160929154502
 
ramCV
ramCVramCV
ramCV
 
Resume 2016
Resume 2016Resume 2016
Resume 2016
 
Bài giảng thiết kế website - truongkinhtethucpham.com
Bài giảng thiết kế website - truongkinhtethucpham.comBài giảng thiết kế website - truongkinhtethucpham.com
Bài giảng thiết kế website - truongkinhtethucpham.com
 
first Michi
first Michifirst Michi
first Michi
 
Early warning through camera-based vital signs monitoring
Early warning through camera-based vital signs monitoring Early warning through camera-based vital signs monitoring
Early warning through camera-based vital signs monitoring
 
Networking 101
Networking 101Networking 101
Networking 101
 
The New Normal in B.C. Hockey
The New Normal in B.C. HockeyThe New Normal in B.C. Hockey
The New Normal in B.C. Hockey
 
Servicios Logísticos Gala Capilla, S.L.
Servicios Logísticos Gala Capilla, S.L.Servicios Logísticos Gala Capilla, S.L.
Servicios Logísticos Gala Capilla, S.L.
 
Conventions of a thriller group peice
Conventions of a thriller group peice Conventions of a thriller group peice
Conventions of a thriller group peice
 
Corn er houët
Corn er houëtCorn er houët
Corn er houët
 
Car Rental Companies In Qatar
Car Rental Companies In  QatarCar Rental Companies In  Qatar
Car Rental Companies In Qatar
 
جيل واعد
جيل واعد  جيل واعد
جيل واعد
 

Similar to Understanding WordPress/WooCommerce Database

Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg Extended
Sören Wrede
 
Wordpress Beirut 21th meetup February
Wordpress Beirut 21th meetup   FebruaryWordpress Beirut 21th meetup   February
Wordpress Beirut 21th meetup February
Fadi Nicolas Zahhar
 
Beginning WordPress Workshop
Beginning WordPress WorkshopBeginning WordPress Workshop
Beginning WordPress Workshop
The Toolbox, Inc.
 
Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
Imran Sayed
 
13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...
Seravo
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
OSInet
 
Wordpress Workshop: Session One
Wordpress Workshop: Session OneWordpress Workshop: Session One
Wordpress Workshop: Session One
WP Web Wizards
 
Wordpress
WordpressWordpress
Wordpress
samirlakhanistb
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
tutorialsruby
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
tutorialsruby
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
Women in Technology Poland
 
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Peter Martin
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
Women in Technology Poland
 
WordPress Security
WordPress SecurityWordPress Security
WordPress for Beginners by wpwebwizards.com
WordPress for Beginners by wpwebwizards.comWordPress for Beginners by wpwebwizards.com
WordPress for Beginners by wpwebwizards.com
WP Web Wizards
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
Santosh Kunwar
 
ODN - Technical introduction of the platform
ODN - Technical introduction of the platformODN - Technical introduction of the platform
ODN - Technical introduction of the platform
Comsode - FP7 project
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
Josh Williams
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
Julien Minguely
 

Similar to Understanding WordPress/WooCommerce Database (20)

Gutenberg Extended
Gutenberg ExtendedGutenberg Extended
Gutenberg Extended
 
Wordpress Beirut 21th meetup February
Wordpress Beirut 21th meetup   FebruaryWordpress Beirut 21th meetup   February
Wordpress Beirut 21th meetup February
 
Beginning WordPress Workshop
Beginning WordPress WorkshopBeginning WordPress Workshop
Beginning WordPress Workshop
 
Digging Into Gutenberg
Digging Into GutenbergDigging Into Gutenberg
Digging Into Gutenberg
 
13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
Scaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQLScaling up and accelerating Drupal 8 with NoSQL
Scaling up and accelerating Drupal 8 with NoSQL
 
Wordpress Workshop: Session One
Wordpress Workshop: Session OneWordpress Workshop: Session One
Wordpress Workshop: Session One
 
Wordpress
WordpressWordpress
Wordpress
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
 
WebsiteStructure
WebsiteStructureWebsiteStructure
WebsiteStructure
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
Developing a Joomla 3.x Component using RAD FOF- Part 2: Front-end + demo - J...
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
WordPress for Beginners by wpwebwizards.com
WordPress for Beginners by wpwebwizards.comWordPress for Beginners by wpwebwizards.com
WordPress for Beginners by wpwebwizards.com
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
ODN - Technical introduction of the platform
ODN - Technical introduction of the platformODN - Technical introduction of the platform
ODN - Technical introduction of the platform
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
 
Wordpress beyond blogging
Wordpress beyond bloggingWordpress beyond blogging
Wordpress beyond blogging
 

Recently uploaded

What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
kalichargn70th171
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
mohitd6
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
OnePlan Solutions
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Luigi Fugaro
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
WebConnect Pvt Ltd
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 

Recently uploaded (20)

What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
Optimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptxOptimizing Your E-commerce with WooCommerce.pptx
Optimizing Your E-commerce with WooCommerce.pptx
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 

Understanding WordPress/WooCommerce Database

  • 1. Understanding WordPress/WooCommerce Database George Georgopoulos, Papaki Full Stack Web Developer & WP enthusiast https://github.com/ggeorg0p Heraklion 10/12/2016
  • 2. Introduction ● High Level approach ● No Multisite ● No Optimization ● Outline ○ WordPress Core ■ General Architecture ■ Table Structure ○ WooCommerce DB
  • 4. General Architecture [WP 4.6.1] ● MySQL version >=5.6 OR MariaDB version >=10.0 ● Default prefix: “wp_” ● 12 tables ● Table “wp_links” no longer used in core ● Hybrid entity/object-oriented and key-value store ● Unique IDs (primary key: bigint[20] unsigned) for each entity within a table (Post/User/Comment/Term ID)
  • 5. Table Structure [WP 4.6.1] ● wp_{object}s tables ○ Main tables are modelled after the object they are storing: ■ wp_posts ■ wp_comments ■ wp_users ■ wp_terms ● wp_{object}meta tables ○ Each object type has a key-value meta store: ■ wp_postmeta ■ wp_usermeta ■ wp_commentmeta ■ wp_termmeta
  • 6. Table Structure [WP 4.6.1] ● Key/Value Store (“NoSQL” like) ● A bit like a dynamic dictionary, in table form ● Values relating to objects are identified by a key ● key can be any valid varchar(255); value can be any primitive or serializable object (PHP serialize function). ● WP_OPTIONS ○ option_id bigint(20) ○ option_name varchar(64) <= key ○ option_value longtext <= value ○ autoload varchar(20)
  • 7. Table Structure [WP 4.6.1] Terms, Term Taxonomies, and Term Relationships ● Legacy Issues ● wp_terms/wp_termmeta: the Term Object/Data ● wp_term_taxonomy: Taxonomy Assignment ● wp_term_relationships: Object relationships ○ object_id ○ term_taxonomy_id ○ term_order
  • 8. WooCommerce [2.6.8] ● Uses Core WP tables for products, coupons, orders, and webhooks ● wp_posts/wp_postmeta/taxonomies ● Vertical structure (Horizontal coming in version 3) Custom tables (“wp_” prefix) woocommerce_sessions woocommerce_tax_rate_locations woocommerce_api_keys woocommerce_shipping_zones woocommerce_attribute_taxonomies woocommerce_shipping_zone_locations woocommerce_tax_rates woocommerce_shipping_zone_methods woocommerce_order_items woocommerce_payment_tokens woocommerce_order_itemmeta woocommerce_payment_tokenmeta woocommerce_downloadable_product_permissions
  • 9. Thank You :) Any Questions? George Georgopoulos, Papaki Full Stack Web Developer & WP enthusiast https://github.com/ggeorg0p