Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
460
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
CSS 101: Τα μυστικά του στυλ - Χάρης Βαλτζής
wpgr
0
10
Ολοκλήρωσα το SiteΜουNowWhat? - Στέφανος Παρασκευόπουλος
wpgr
0
9
Effective personal and business branding - Maria Zarotiadou
wpgr
0
9
Web Accessibility: Hardships, pitfalls, opportunities, and preparing for European Accessibility Act 2025 - Χρήστος Μπαφέρας
wpgr
0
15
Code, Test, Repeat: Accelerating Development with WordPress Playground - Uros Tasic
wpgr
0
13
Make your users’ search experience great - Nico Orfanos
wpgr
0
19
WooCommerce Automations: Revolutionizing eCommerce with Practical Solutions - Ioannis Kastorinis
wpgr
0
21
Block themes: The future of Full Site Editing and what to expect from WordPress 6.7 - Alexandros Kaounas
wpgr
0
17
Forking the GPL way - Βαγγέλης Παπαϊωάννου, Ορέστης Σαμαράς
wpgr
0
13
Other Decks in Programming
See All in Programming
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
return文におけるstd::moveについて
onihusube
1
1.4k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
php-conference-japan-2024
tasuku43
0
430
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
3
190
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
7.7k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
580
Jaspr Dart Web Framework 박제창 @Devfest 2024
itsmedreamwalker
0
150
DMMオンラインサロンアプリのSwift化
hayatan
0
180
Flatt Security XSS Challenge 解答・解説
flatt_security
0
730
良いユニットテストを書こう
mototakatsu
11
3.6k
快速入門可觀測性
blueswen
0
500
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
GraphQLとの向き合い方2022年版
quramy
44
13k
Six Lessons from altMBA
skipperchong
27
3.6k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
BBQ
matthewcrist
85
9.4k
KATA
mclloyd
29
14k
How GitHub (no longer) Works
holman
312
140k
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