MySQL Tips for WordPress
Upcoming SlideShare
Loading in...5
×
 

MySQL Tips for WordPress

on

  • 1,633 views

 

Statistics

Views

Total Views
1,633
Views on SlideShare
1,239
Embed Views
394

Actions

Likes
0
Downloads
6
Comments
0

7 Embeds 394

http://blog.dsero.com 285
http://wptlv.org 66
http://www.wptlv.org 34
http://wptlv.org.il 4
https://www.linkedin.com 3
http://translate.googleusercontent.com 1
http://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • http://www.prelovac.com/vladimir/wordpress-optimization-guide

MySQL Tips for WordPress MySQL Tips for WordPress Presentation Transcript

  • info@dsero.com http://www.dsero.comThe 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? HardwareNetwork 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 32wp_comments InnoDB 99 827 81 65wp_links InnoDB 7 2340 16 16wp_options InnoDB 171 12743 2179 16wp_postmeta InnoDB 340 289 98 32wp_posts InnoDB 689 3448 2375 163wp_term_relationships InnoDB 74 221 16 16wp_term_taxonomy InnoDB 38 431 16 32wp_terms InnoDB 38 431 16 32wp_usermeta InnoDB 61 268 16 32wp_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 718Qcache_free_memory 13004008Qcache_hits 780759Qcache_inserts 56292Qcache_lowmem_prunes 0Qcache_not_cached 3711Qcache_queries_in_cache 1715Qcache_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.shhttp://www.farhanfaisal.com/2010/11/fine-tuning-apache-and-mysql-for-performance-and-security/
  • #8: Enable Slow Query Regular Joins w/o Indexesmysql> 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.comJoin the Battle for the Blogosphere!