SlideShare a Scribd company logo
info@dsero.com
                 http://www.dsero.com

The Anti AdBlock Creators
The Original Site…
With AdBlock
dSero Anti AdBlock is The Solution
The Engine Behind this Site is MySQL
What WordPress is Made Of?




                                                                                                       Hardware
Network



                              Apache

                                                               MySQL

                                                                                               Linux
          PHP




            http://www.perforce.com/blog/110607/how-do-they-do-it-googles-one-server-trick
            http://kleanpc.com/cms/services/linux-implementations/
            http://www.w3resource.com/mysql/mysql-tutorials.php
            http://aserverblog.blogspot.co.il/2012/02/apache-releases-v2222-for-apache-http.html
            http://www.makemoneyinlife.com/make-money-with-php-scripts-and-programming.html
            http://www.glosecgroup.com/index.php?pid=2&menu=134&open=6&item_id=0&div=5
What Our Database is made of?
Name                    Engine Rows Row (B) Data (KB) Index (KB)
wp_commentmeta          InnoDB   297    496        147           32
wp_comments             InnoDB    99    827         81           65
wp_links                InnoDB     7 2340           16           16
wp_options              InnoDB   171 12743        2179           16
wp_postmeta             InnoDB   340    289         98           32
wp_posts                InnoDB   689 3448         2375         163
wp_term_relationships   InnoDB    74    221         16           16
wp_term_taxonomy        InnoDB    38    431         16           32
wp_terms                InnoDB    38    431         16           32
wp_usermeta             InnoDB    61    268         16           32
wp_users                InnoDB     3 5461           16           32
What wp_post is made of?

post_type          #         %
revision               501       84%
attachment              63       11%
post                    21        4%
nav_menu_item            5        1%
page                     5        1%
#1: Consider Avoiding Revisions

 wp-config.php
   define('WP_POST_REVISIONS', false);
 MySQL
   DELETE
    FROM wp_posts
    WHERE post_type = "revision";
#1: Consider Avoiding Revisions

 wp-config.php
   define('WP_POST_REVISIONS', false);
 MySQL
   DELETE
    FROM wp_posts
    WHERE post_type = "revision";
#2: Optimize RAM Usage

 Preferred: SizeOf(database) < SizeOf(RAM)
 innodb_buffer_pool_size
   50-70% of your RAM
Do We Utilize the Cache?

 SHOW STATUS LIKE 'Qcache%';
Qcache_free_blocks        718
Qcache_free_memory        13004008
Qcache_hits               780759
Qcache_inserts            56292
Qcache_lowmem_prunes      0
Qcache_not_cached         3711
Qcache_queries_in_cache   1715
Qcache_total_blocks       4344
#3: Cache Queries

 query_cache_type = 1
 query_cache_limit = 1M
 query_cache_size = 16M
#4: Buffer Optimization

 key_reads/key_read_requests < 0.01
 If not
   Increase Key Buffer
#5: CPU Optimization

 thread_concurrency = 2 X #(CPU Cores)
#7: Run MySQLTuner.pl +
        Tuning-Premier.sh




http://www.farhanfaisal.com/2010/11/fine-tuning-apache-and-mysql-for-performance-and-security/
#8: Enable Slow Query

 Regular
 Joins w/o Indexes

mysql> explain SELECT COUNT(*), post_type FROM wp_posts GROUP BY post_type;
+----+-------------+----------+-------+---------------+------------------+---------+------+------+-------------
+
| id | select_type | table    | type | possible_keys | key               | key_len | ref | rows | Extra
+----+-------------+----------+-------+---------------+------------------+---------+------+------+-------------
+
| 1 | SIMPLE       | wp_posts | index | NULL          | type_status_date | 140     | NULL | 693 | Using index
+----+-------------+----------+-------+---------------+------------------+---------+------+------+-------------
+
1 row in set (0.02 sec)
#9: Multiply Database Servers
#10: BackUp

   Consistent
   mysqldump
   Slave Backup
   XtraDB
#11: Security

 Root
 User w/ Permissions to WordPress DB only
 Keep FireWall closed:
   3306
   Only relevant IPs
info@dsero.com
                      http://www.dsero.com

Join the Battle for the Blogosphere!

More Related Content

PPTX
WordPress Performance
PPTX
WordPress Security: Defend yourself against digital invaders
PPTX
WordPress security for everyone
PDF
WordCamp Finland 2015 - WordPress Security
PDF
Be ef presentation-securitybyte2011-michele_orru
PDF
Advances in BeEF - AthCon2012
PPTX
WordPress performance tuning
PPTX
Wordpress customer support
WordPress Performance
WordPress Security: Defend yourself against digital invaders
WordPress security for everyone
WordCamp Finland 2015 - WordPress Security
Be ef presentation-securitybyte2011-michele_orru
Advances in BeEF - AthCon2012
WordPress performance tuning
Wordpress customer support

What's hot (20)

PDF
10 things every developer should know about their database to run word press ...
PDF
Scaling WordPress
PPTX
Css hacks for different browsers
PDF
8 Ways to Hack a WordPress website
PDF
Hacktivity2011 be ef-preso_micheleorru
KEY
FMCakeMixってウマいの?
PPSX
Web server
PPTX
WordPress Optimization & Security - LAC 2013, London
PPTX
AEM WITH MONGODB
ODP
Optimizing Drupal Performance (English)
PDF
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
ODP
Optimizing Drupal Performance. Tips and Tricks
PPTX
Matt doyleppt
PDF
Speed Up Wordpress, Wordpress Horsepower
PDF
High performance web server
PDF
HTTPS + Let's Encrypt
ODP
Top 10 WordPress Plugins
PDF
Die .htaccess richtig nutzen
PDF
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
ODP
Top 10 WordPress Plugins
10 things every developer should know about their database to run word press ...
Scaling WordPress
Css hacks for different browsers
8 Ways to Hack a WordPress website
Hacktivity2011 be ef-preso_micheleorru
FMCakeMixってウマいの?
Web server
WordPress Optimization & Security - LAC 2013, London
AEM WITH MONGODB
Optimizing Drupal Performance (English)
How to install and configure lamp (linux,apache mysql mariadb,php) with jooml...
Optimizing Drupal Performance. Tips and Tricks
Matt doyleppt
Speed Up Wordpress, Wordpress Horsepower
High performance web server
HTTPS + Let's Encrypt
Top 10 WordPress Plugins
Die .htaccess richtig nutzen
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
Top 10 WordPress Plugins
Ad

Viewers also liked (6)

KEY
The 10 Must-Have Plugins for Your Sites
PDF
WordPress What Ya Need to Know: Branded
PDF
Transposh
PDF
WordPress SEO
PPTX
How to create and promote a drupal anti ad block module
PPTX
Wix Apps in WP TLV
The 10 Must-Have Plugins for Your Sites
WordPress What Ya Need to Know: Branded
Transposh
WordPress SEO
How to create and promote a drupal anti ad block module
Wix Apps in WP TLV
Ad

Similar to MySQL Tips for WordPress (20)

PPTX
Anthony Somerset - Site Speed = Success!
PDF
WordPress Performance & Scalability
PDF
Speeding up your WordPress site - WordCamp Hamilton 2015
PDF
My Sql And Search At Craigslist
PDF
My First 100 days with a MySQL DBMS
PPTX
Joomla! Performance on Steroids
ODP
Beyond PHP - It's not (just) about the code
PDF
Your backend architecture is what matters slideshare
PPTX
PHP Training In Ambala! BATRA COMPUTER CENTRE
KEY
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
ODP
Caching and tuning fun for high scalability
PDF
Bottom to Top Stack Optimization with LAMP
PDF
Bottom to Top Stack Optimization - CICON2011
ODP
MySQL Scaling Presentation
ODP
Beyond php - it's not (just) about the code
ODP
Beyond php it's not (just) about the code
PPS
MySQL Optimization from a Developer's point of view
PPTX
WordCamp Harare 2016 - Site Speed = Success
PPTX
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
ODP
Beyond PHP - it's not (just) about the code
Anthony Somerset - Site Speed = Success!
WordPress Performance & Scalability
Speeding up your WordPress site - WordCamp Hamilton 2015
My Sql And Search At Craigslist
My First 100 days with a MySQL DBMS
Joomla! Performance on Steroids
Beyond PHP - It's not (just) about the code
Your backend architecture is what matters slideshare
PHP Training In Ambala! BATRA COMPUTER CENTRE
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Caching and tuning fun for high scalability
Bottom to Top Stack Optimization with LAMP
Bottom to Top Stack Optimization - CICON2011
MySQL Scaling Presentation
Beyond php - it's not (just) about the code
Beyond php it's not (just) about the code
MySQL Optimization from a Developer's point of view
WordCamp Harare 2016 - Site Speed = Success
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Beyond PHP - it's not (just) about the code

More from dsero (7)

PDF
Responsive Sites with WordPress
PDF
SideLang 5min Presentation @ WP TLV
PDF
Transposh WPTLV
PDF
One Hour Translation at WPTLV
PDF
Engage Your Readers
PPT
G+ for Bloggers
PDF
RightAd Lecture
Responsive Sites with WordPress
SideLang 5min Presentation @ WP TLV
Transposh WPTLV
One Hour Translation at WPTLV
Engage Your Readers
G+ for Bloggers
RightAd Lecture

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Reach Out and Touch Someone: Haptics and Empathic Computing
20250228 LYD VKU AI Blended-Learning.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
Building Integrated photovoltaic BIPV_UPV.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?

MySQL Tips for WordPress

  • 1. info@dsero.com http://www.dsero.com The Anti AdBlock Creators
  • 4. dSero Anti AdBlock is The Solution
  • 5. The Engine Behind this Site is MySQL
  • 6. What WordPress is Made Of? Hardware Network Apache MySQL Linux PHP http://www.perforce.com/blog/110607/how-do-they-do-it-googles-one-server-trick http://kleanpc.com/cms/services/linux-implementations/ http://www.w3resource.com/mysql/mysql-tutorials.php http://aserverblog.blogspot.co.il/2012/02/apache-releases-v2222-for-apache-http.html http://www.makemoneyinlife.com/make-money-with-php-scripts-and-programming.html http://www.glosecgroup.com/index.php?pid=2&menu=134&open=6&item_id=0&div=5
  • 7. What Our Database is made of? Name Engine Rows Row (B) Data (KB) Index (KB) wp_commentmeta InnoDB 297 496 147 32 wp_comments InnoDB 99 827 81 65 wp_links InnoDB 7 2340 16 16 wp_options InnoDB 171 12743 2179 16 wp_postmeta InnoDB 340 289 98 32 wp_posts InnoDB 689 3448 2375 163 wp_term_relationships InnoDB 74 221 16 16 wp_term_taxonomy InnoDB 38 431 16 32 wp_terms InnoDB 38 431 16 32 wp_usermeta InnoDB 61 268 16 32 wp_users InnoDB 3 5461 16 32
  • 8. What wp_post is made of? post_type # % revision 501 84% attachment 63 11% post 21 4% nav_menu_item 5 1% page 5 1%
  • 9. #1: Consider Avoiding Revisions  wp-config.php  define('WP_POST_REVISIONS', false);  MySQL  DELETE FROM wp_posts WHERE post_type = "revision";
  • 10. #1: Consider Avoiding Revisions  wp-config.php  define('WP_POST_REVISIONS', false);  MySQL  DELETE FROM wp_posts WHERE post_type = "revision";
  • 11. #2: Optimize RAM Usage  Preferred: SizeOf(database) < SizeOf(RAM)  innodb_buffer_pool_size  50-70% of your RAM
  • 12. Do We Utilize the Cache?  SHOW STATUS LIKE 'Qcache%'; Qcache_free_blocks 718 Qcache_free_memory 13004008 Qcache_hits 780759 Qcache_inserts 56292 Qcache_lowmem_prunes 0 Qcache_not_cached 3711 Qcache_queries_in_cache 1715 Qcache_total_blocks 4344
  • 13. #3: Cache Queries  query_cache_type = 1  query_cache_limit = 1M  query_cache_size = 16M
  • 14. #4: Buffer Optimization  key_reads/key_read_requests < 0.01  If not  Increase Key Buffer
  • 15. #5: CPU Optimization  thread_concurrency = 2 X #(CPU Cores)
  • 16. #7: Run MySQLTuner.pl + Tuning-Premier.sh http://www.farhanfaisal.com/2010/11/fine-tuning-apache-and-mysql-for-performance-and-security/
  • 17. #8: Enable Slow Query  Regular  Joins w/o Indexes mysql> explain SELECT COUNT(*), post_type FROM wp_posts GROUP BY post_type; +----+-------------+----------+-------+---------------+------------------+---------+------+------+------------- + | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra +----+-------------+----------+-------+---------------+------------------+---------+------+------+------------- + | 1 | SIMPLE | wp_posts | index | NULL | type_status_date | 140 | NULL | 693 | Using index +----+-------------+----------+-------+---------------+------------------+---------+------+------+------------- + 1 row in set (0.02 sec)
  • 19. #10: BackUp  Consistent  mysqldump  Slave Backup  XtraDB
  • 20. #11: Security  Root  User w/ Permissions to WordPress DB only  Keep FireWall closed:  3306  Only relevant IPs
  • 21. info@dsero.com http://www.dsero.com Join the Battle for the Blogosphere!

Editor's Notes

  • #13: http://www.prelovac.com/vladimir/wordpress-optimization-guide