$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mauricio Gelves - WordPress Database: What’s be...
Search
WordPress Greek Community
November 19, 2016
Programming
2
520
Mauricio Gelves - WordPress Database: What’s behind those 12 tables - WordCamp Athens 2016
WordPress Greek Community
November 19, 2016
Tweet
Share
More Decks by WordPress Greek Community
See All by WordPress Greek Community
Thanassis Zannias - Flexible WordPress Dev Environment with Docker
wpgr
0
26
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
31
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
37
Unlocking creativity - Marilia Darilli
wpgr
0
73
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
53
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
68
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
76
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
84
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
68
Other Decks in Programming
See All in Programming
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.3k
モダンJSフレームワークのビルドプロセス 〜なぜReactは503行、Svelteは12行なのか〜
fuuki12
0
190
俺流レスポンシブコーディング 2025
tak_dcxi
13
7.7k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
140
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
120
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
110
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
140
分散DBって何者なんだ... Spannerから学ぶRDBとの違い
iwashi623
0
170
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
140
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
6
1.9k
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
260
エディターってAIで操作できるんだぜ
kis9a
0
650
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
KATA
mclloyd
PRO
32
15k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Site-Speed That Sticks
csswizardry
13
990
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
960
Speed Design
sergeychernyshev
33
1.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Balancing Empowerment & Direction
lara
5
780
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Transcript
WordPress Database: What’s behind those 12 tables? Mauricio Gelves |
@maugelves
Do you know this Masterpiece?
None
None
None
A love story
None
Set of columns Data types Indexes The table anatomy
Table rows
I’m Rebel!
Normalization
Process to avoid: • Data redundancy • Unnecessary updates •
Data integrity problems
None
None
None
None
None
WordPress code of conduct: No political jokes are allowed
UPDATE tbl_students SET president = '<new president name>' WHERE president
= 'Prokopis Pavlopoulos' On every change:
Normalized tables: FK’s (Foreign Keys)
¿Is WordPress Rebel?
• wp-posts • wp-term-taxonomy
None
None
None
33,3333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333
333333333333333333333333333333333333333 333333333333333333333333333333333333…%
¿Why WordPress powers 26% of all websites?
ES FLEXIBLE
KEY => VALUE
wp_posts WordPress’ Heart.
wp_posts
¿Where’s the rest of the information?
Meta Tables wp_posts => wp_postmeta wp_users => wp_usermeta wp_comments =>
wp_commentmeta wp_terms => wp_termmeta
KEY VALUE => wp_posts
KEY VALUE => Usuarios
SHE ’S ORGANIZED
KEY VALUE => wp_options
SHE’S ADAPTABLE
Taxonomies
Taxonomías Simple terms Which taxonomy has?
Es muy fácil comunicarse con ella: Diapositiva: una mujer con
un teléfono It’s easy to talk to her
SQL Structured Query Language
Estructura de consulta: Which column/s? Which table/s? Should we filter
the search?
¿Do we have to know SQL to work with WordPress?
WordPress Functions:
What if we need Meta values?
WordPress Functions:
and for more complex searches?
WP_Query
None
None
None
CUSTOM TABLES How and why?
Why Custom Tables?: • Efficiency (Inner joins) • Efficiency (calculated
fields) • Space (uncompleted fields) • Data security
How to create a Custom Tables?: • Create it on
plugin/theme activation
None
How to create a Custom Tables?: • Create it on
plugin/theme activation • UI implementation with WP_List class
None
http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/
Because of this and more I’m in love with the
WordPress database.
Thank you! @maugelves