SlideShare a Scribd company logo
Spring Cleaning Your Site:
Dirtless Databases
How to Keep Your WordPress Database Squeaky Clean
Adam Soucie
• Highforge
• Web Developer
• Content writer
• All of your site’s data
• Pages, posts, comments,
etc.
• You don’t have a site without
it
What is WordPress Database?
4 Easy Tips
1. Optimize using MySQL
2. Repair broken tables
3. Prevent/limit revisions
4. Delete excess junk
• Make a database
backup
• Spend 10 minutes
reviewing your site
• Set up a development
environment if possible
BEFORE YOU BEGIN
Optimizing using MySQL
1. Log in to PHPMyAdmin
2. Select “Check Tables
Having Overhead”
3. Select “Optimize Table”
• Can be done through
PHPMyAdmin
• WordPress will repair
automatically as of 2.9
• Must be enabled in 

wp-config.php
Repairing Broken Tables
define( 'WP_ALLOW_REPAIR', TRUE );
Source: http://premium.wpmudev.org/blog/wordpress-maintenance-101-how-to-optimize-and-repair-database-tables/
Prevent/Limit Revisions
1. Different from autosaves
2. Revisions created every
time you save
3. Can be limited or
completely prevented
4. Handled in 

wp-config.php
define( 'WP_POST_REVISIONS', X );
where X is the number of revisions
or
‘TRUE’ to allow unlimited
Source: http://codex.wordpress.org/Revisions
• Expired transients
• Spam and unapproved
comments
• Trashed items (posts,
pages, etc.)
Cleaning Excess Junk
define( ‘EMPTY_TRASH_DAYS’, X );
where X is the number of days
Source: http://www.wpexplorer.com/optimize-wordpress-database/
The Transients Debate
1. Created with the Transient API
2. Supposed to expire and be deleted
3. Relied upon by lazy developers
4. WordPress only wipes them on Database Upgrades
The Plugins
1. WP-Optimize
2. purge-transients

https://github.com/Seebz/Snippets/tree/master/Wordpress/
plugins/purge-transients
Any questions?
Sources:
The WordPress Codex
WP Tavern (wptavern.com)
WP Explorer (wpexplorer.com)
Stu Miller (stumiller.me)
More info:
www.adamsoucie.com
www.highforge.com
Illustrations by:
Tina Fiume

More Related Content

What's hot

WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
Brad Williams
 
Word Press Website Tips
Word Press Website TipsWord Press Website Tips
Word Press Website Tips
Enuke Software Pvt Ltd
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress Multisite
Lisa Sabin-Wilson
 
Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710
reedgustow
 
Installing wordpress
Installing wordpressInstalling wordpress
Installing wordpress
Dave Wallace
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
JoomlaDay Australia
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
Alan Lok
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
Dave Wallace
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
vnsavage
 
Creating Local WordPress Installs
Creating Local WordPress InstallsCreating Local WordPress Installs
Creating Local WordPress Installs
mcgaritydotme
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
Think Media Inc.
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
Business Vitality LLC
 
Command Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User GroupCommand Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User Group
James Collins
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLI
James Collins
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3
kidtangerine
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site
Leslie Doherty
 
The Power of a Video Library - WordCamp Raleigh
The  Power of a Video Library - WordCamp RaleighThe  Power of a Video Library - WordCamp Raleigh
The Power of a Video Library - WordCamp Raleigh
Lauren Jeffcoat
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
Think Media Inc.
 
Understanding WordPress Multisite
Understanding WordPress MultisiteUnderstanding WordPress Multisite
Understanding WordPress Multisite
Ryan Imel
 

What's hot (20)

WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
Word Press Website Tips
Word Press Website TipsWord Press Website Tips
Word Press Website Tips
 
Exploring WordPress Multisite
Exploring WordPress MultisiteExploring WordPress Multisite
Exploring WordPress Multisite
 
Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710
 
Installing wordpress
Installing wordpressInstalling wordpress
Installing wordpress
 
Content Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme developmentContent Management Systems (CMS) & Wordpress theme development
Content Management Systems (CMS) & Wordpress theme development
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
 
Anatomy of a Wordpress theme
Anatomy of a Wordpress themeAnatomy of a Wordpress theme
Anatomy of a Wordpress theme
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
 
Creating Local WordPress Installs
Creating Local WordPress InstallsCreating Local WordPress Installs
Creating Local WordPress Installs
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
Piecing Together the WordPress Puzzle
Piecing Together the WordPress PuzzlePiecing Together the WordPress Puzzle
Piecing Together the WordPress Puzzle
 
Command Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User GroupCommand Line WordPress with WP-CLI - WordPress Perth User Group
Command Line WordPress with WP-CLI - WordPress Perth User Group
 
Command Line WordPress with WP-CLI
Command Line WordPress with WP-CLICommand Line WordPress with WP-CLI
Command Line WordPress with WP-CLI
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site
 
The Power of a Video Library - WordCamp Raleigh
The  Power of a Video Library - WordCamp RaleighThe  Power of a Video Library - WordCamp Raleigh
The Power of a Video Library - WordCamp Raleigh
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
 
Understanding WordPress Multisite
Understanding WordPress MultisiteUnderstanding WordPress Multisite
Understanding WordPress Multisite
 

Similar to Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean

Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website development
John Faust
 
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Georgiana Laudi
 
Word press workshop powerpoint
Word press workshop   powerpointWord press workshop   powerpoint
Word press workshop powerpoint
erezwe
 
The WordPress Way
The WordPress WayThe WordPress Way
The WordPress Way
Kan Ouivirach, Ph.D.
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate Workshop
The Toolbox, Inc.
 
Update Smart: Use a staging site!
Update Smart: Use a staging site!Update Smart: Use a staging site!
Update Smart: Use a staging site!
Meagan Hanes
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
Boston WordPress
 
Wp maintenance and Security
Wp maintenance and SecurityWp maintenance and Security
Wp maintenance and Security
Dee Teal
 
Wordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytianWordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytian
Grant Merriel
 
How do you speed up your (Wordpress) website?
How do you speed up your (Wordpress) website?How do you speed up your (Wordpress) website?
How do you speed up your (Wordpress) website?
Aranere
 
WordPress
WordPressWordPress
WordPress
risager
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
Danilo Ercoli
 
An Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp PhoenixAn Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp Phoenix
vegasgeek
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
OpenSource Technologies Pvt. Ltd.
 
How WordPress Sites Get Hacked
How WordPress Sites Get HackedHow WordPress Sites Get Hacked
How WordPress Sites Get Hacked
Andrew Marks
 
WP-1-cms.pdf
WP-1-cms.pdfWP-1-cms.pdf
WP-1-cms.pdf
HezekiahOluwadamilar1
 
WordPress Fav Plugins & Security
WordPress Fav Plugins & SecurityWordPress Fav Plugins & Security
WordPress Fav Plugins & Security
The Toolbox, Inc.
 
WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013
Warren Denley
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Trivandrum
 
WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015
Shawn Hooper
 

Similar to Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean (20)

Wordpress website development
Wordpress website developmentWordpress website development
Wordpress website development
 
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
 
Word press workshop powerpoint
Word press workshop   powerpointWord press workshop   powerpoint
Word press workshop powerpoint
 
The WordPress Way
The WordPress WayThe WordPress Way
The WordPress Way
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate Workshop
 
Update Smart: Use a staging site!
Update Smart: Use a staging site!Update Smart: Use a staging site!
Update Smart: Use a staging site!
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
Wp maintenance and Security
Wp maintenance and SecurityWp maintenance and Security
Wp maintenance and Security
 
Wordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytianWordpress Page Load Speed - Kenneth sytian
Wordpress Page Load Speed - Kenneth sytian
 
How do you speed up your (Wordpress) website?
How do you speed up your (Wordpress) website?How do you speed up your (Wordpress) website?
How do you speed up your (Wordpress) website?
 
WordPress
WordPressWordPress
WordPress
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
 
An Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp PhoenixAn Introduction to Multisite - WordCamp Phoenix
An Introduction to Multisite - WordCamp Phoenix
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
How WordPress Sites Get Hacked
How WordPress Sites Get HackedHow WordPress Sites Get Hacked
How WordPress Sites Get Hacked
 
WP-1-cms.pdf
WP-1-cms.pdfWP-1-cms.pdf
WP-1-cms.pdf
 
WordPress Fav Plugins & Security
WordPress Fav Plugins & SecurityWordPress Fav Plugins & Security
WordPress Fav Plugins & Security
 
WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015WP-CLI - WordCamp Miami 2015
WP-CLI - WordCamp Miami 2015
 

Recently uploaded

一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 

Recently uploaded (12)

一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 

Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean