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 ...
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
Repai...
define( 'WP_ALLOW_REPAIR', TRUE );
Source: http://premium.wpmudev.org/blog/wordpress-maintenance-101-how-to-optimize-and-re...
Prevent/Limit Revisions
1. Different from autosaves
2. Revisions created every
time you save
3. Can be limited or
complete...
define( 'WP_POST_REVISIONS', X );
where X is the number of revisions
or
‘TRUE’ to allow unlimited
Source: http://codex.word...
• 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-databas...
The Transients Debate
1. Created with the Transient API
2. Supposed to expire and be deleted
3. Relied upon by lazy develo...
The Plugins
1. WP-Optimize
2. purge-transients

https://github.com/Seebz/Snippets/tree/master/Wordpress/
plugins/purge-tra...
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
Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean
Upcoming SlideShare
Loading in …5
×

Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean

1,411 views
1,351 views

Published on

Is your site still running slow, like it's just coming out of hibernation? Have you tried every optimization trick from cacheing to throwing cash at it? It might just be your database dragging you down. For both dedicated developers and beginner bloggers, we'll show you MySQL commands, WordPress functions, and easy-to-use plugins that'll get your databases slimmed down and ready for swimsuit season

Published in: Internet, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,411
On SlideShare
0
From Embeds
0
Number of Embeds
1,002
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dirtless Databases - How to Keep Your WordPress Database Squeaky Clean

  1. 1. Spring Cleaning Your Site: Dirtless Databases How to Keep Your WordPress Database Squeaky Clean
  2. 2. Adam Soucie • Highforge • Web Developer • Content writer
  3. 3. • All of your site’s data • Pages, posts, comments, etc. • You don’t have a site without it What is WordPress Database?
  4. 4. 4 Easy Tips 1. Optimize using MySQL 2. Repair broken tables 3. Prevent/limit revisions 4. Delete excess junk
  5. 5. • Make a database backup • Spend 10 minutes reviewing your site • Set up a development environment if possible BEFORE YOU BEGIN
  6. 6. Optimizing using MySQL 1. Log in to PHPMyAdmin 2. Select “Check Tables Having Overhead” 3. Select “Optimize Table”
  7. 7. • Can be done through PHPMyAdmin • WordPress will repair automatically as of 2.9 • Must be enabled in 
 wp-config.php Repairing Broken Tables
  8. 8. define( 'WP_ALLOW_REPAIR', TRUE ); Source: http://premium.wpmudev.org/blog/wordpress-maintenance-101-how-to-optimize-and-repair-database-tables/
  9. 9. 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
  10. 10. define( 'WP_POST_REVISIONS', X ); where X is the number of revisions or ‘TRUE’ to allow unlimited Source: http://codex.wordpress.org/Revisions
  11. 11. • Expired transients • Spam and unapproved comments • Trashed items (posts, pages, etc.) Cleaning Excess Junk
  12. 12. define( ‘EMPTY_TRASH_DAYS’, X ); where X is the number of days Source: http://www.wpexplorer.com/optimize-wordpress-database/
  13. 13. 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
  14. 14. The Plugins 1. WP-Optimize 2. purge-transients
 https://github.com/Seebz/Snippets/tree/master/Wordpress/ plugins/purge-transients
  15. 15. Any questions?
  16. 16. Sources: The WordPress Codex WP Tavern (wptavern.com) WP Explorer (wpexplorer.com) Stu Miller (stumiller.me)
  17. 17. More info: www.adamsoucie.com www.highforge.com Illustrations by: Tina Fiume

×