SlideShare uma empresa Scribd logo
1 de 21
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!

Mais conteúdo relacionado

Mais procurados

Css hacks for different browsers
Css hacks for different browsersCss hacks for different browsers
Css hacks for different browsers
Savitha Chandra
 
Hacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruHacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorru
Michele Orru
 
FMCakeMixってウマいの?
FMCakeMixってウマいの?FMCakeMixってウマいの?
FMCakeMixってウマいの?
Kentaro Suzuki
 
Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
Reem Al-Ashry
 
Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
Reem Al-Ashry
 

Mais procurados (20)

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

Destaque (6)

The 10 Must-Have Plugins for Your Sites
The 10 Must-Have Plugins for Your SitesThe 10 Must-Have Plugins for Your Sites
The 10 Must-Have Plugins for Your Sites
 
WordPress What Ya Need to Know: Branded
WordPress What Ya Need to Know: BrandedWordPress What Ya Need to Know: Branded
WordPress What Ya Need to Know: Branded
 
Transposh
TransposhTransposh
Transposh
 
WordPress SEO
WordPress SEOWordPress SEO
WordPress SEO
 
How to create and promote a drupal anti ad block module
How to create and promote a drupal anti ad block moduleHow to create and promote a drupal anti ad block module
How to create and promote a drupal anti ad block module
 
Wix Apps in WP TLV
Wix Apps in WP TLVWix Apps in WP TLV
Wix Apps in WP TLV
 

Semelhante a MySQL Tips for WordPress

Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
MySQL Scaling Presentation
MySQL Scaling PresentationMySQL Scaling Presentation
MySQL Scaling Presentation
Tommy Falgout
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
Bo-Yi Wu
 

Semelhante a MySQL Tips for WordPress (20)

MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015Speeding up your WordPress site - WordCamp Hamilton 2015
Speeding up your WordPress site - WordCamp Hamilton 2015
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
MySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeMySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgrade
 
MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
MySQL Scaling Presentation
MySQL Scaling PresentationMySQL Scaling Presentation
MySQL Scaling Presentation
 
Sql php-vibrant course-mumbai(1)
Sql php-vibrant course-mumbai(1)Sql php-vibrant course-mumbai(1)
Sql php-vibrant course-mumbai(1)
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
Intro to PECL/mysqlnd_ms (4/7/2011)
Intro to PECL/mysqlnd_ms (4/7/2011)Intro to PECL/mysqlnd_ms (4/7/2011)
Intro to PECL/mysqlnd_ms (4/7/2011)
 
PHP FUNCTIONS
PHP FUNCTIONSPHP FUNCTIONS
PHP FUNCTIONS
 
MySQLinsanity
MySQLinsanityMySQLinsanity
MySQLinsanity
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
 
Php classes in mumbai
Php classes in mumbaiPhp classes in mumbai
Php classes in mumbai
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQL
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
 
Deep Dive Spider Engine
Deep Dive Spider EngineDeep Dive Spider Engine
Deep Dive Spider Engine
 

Mais de dsero (7)

Responsive Sites with WordPress
Responsive Sites with WordPressResponsive Sites with WordPress
Responsive Sites with WordPress
 
SideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLVSideLang 5min Presentation @ WP TLV
SideLang 5min Presentation @ WP TLV
 
Transposh WPTLV
Transposh WPTLVTransposh WPTLV
Transposh WPTLV
 
One Hour Translation at WPTLV
One Hour Translation at WPTLVOne Hour Translation at WPTLV
One Hour Translation at WPTLV
 
Engage Your Readers
Engage Your ReadersEngage Your Readers
Engage Your Readers
 
G+ for Bloggers
G+ for BloggersG+ for Bloggers
G+ for Bloggers
 
RightAd Lecture
RightAd LectureRightAd Lecture
RightAd Lecture
 

Último

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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!

Notas do Editor

  1. http://www.prelovac.com/vladimir/wordpress-optimization-guide