SlideShare a Scribd company logo
1 of 30
Download to read offline
Op#mizing	
  &	
  
Speeding	
  Up	
  a	
  
WordPress	
  Site	
  
Vinay	
  Paudel	
  
  tweet	
  @paudelvinay	
  
Email:	
  paudelvinay@gmail.com	
  
Blog	
  :	
  h:p://vinayp.com.np	
  
Wordpress Structure
Facts/Results

•  80-­‐90%	
  of	
  the	
  end-­‐user	
  response	
  Dme	
  is	
  spent	
  
   downloading	
  all	
  the	
  components	
  in	
  the	
  page:	
  
   images,	
  stylesheets,	
  scripts,	
  Flash,	
  etc	
  
•  Site	
  having	
  loading	
  Dme	
  more	
  than	
  5	
  minutes	
  
   loose	
  50%	
  visitors.	
  
•  Less	
  H:p	
  Request,	
  More	
  fastest	
  the	
  site	
  
Facts/Results
Facts/Results
Optimize theme

•  well-coded theme.
•  Find any unclose tag on theme
•  Check malicious/unwanted code
  – Theme	
  AuthenDcity	
  Checker	
  (TAC)	
  (h:p://
    wordpress.org/extend/plugins/tac/)	
  
  – Exploit	
  Scanner	
  (h:p://wordpress.org/extend/
    plugins/exploit-­‐scanner/)	
  
Optimize theme
•  Images
  – Replace some of the images with text
  – Use GIF, PNG and JPEG format
  – Try WP-Smush
Optimize theme

•  Use CSS Sprites
Optimize theme	
  

•  Combine minify and compress HTML, JS and
   CSS
  – Use compressor tools
  – Use Plugins
     •  WP Minify (http://wordpress.org/extend/plugins/wp-
        minify/ )
     •  Better WordPress Minify (http://wordpress.org/extend/
        plugins/bwp-minify/)


•  Put CSS on header and JavaScript on footer	
  
Optimize theme	
  
•  Non Persistent caching
Optimize theme	
  
•  Persistent caching
Optimize/Speed up Plugins

•  Be selective on plugins choice.
Optimize/Speed up Plugins	
  
Optimize/Speed up Plugins	
  

•  Deactivate and delete unnecessary plugins
Optimize/Speed up Plugins	
  
Optimize/Speed up Plugins	
  

•  Check	
  plugins	
  performance	
  
   – P3	
  (Plugin	
  Performance	
  Profiler)	
  (h:p://
     wordpress.org/extend/plugins/p3-­‐profiler/)	
  
Optimize/Speed up Plugins	
  
Cache Using Plugins
•  Caching Plugins
  – W3 Total Cache (http://wordpress.org/extend/
    plugins/w3-total-cache/)
  – WP Super Cache (http://wordpress.org/extend/
    plugins/wp-super-cache/)
Apply CDN using Plugins	
  

•  CDN (content delivery Network).
  – W3 Total Cache
  – image files, js files, css files, uploaded files
Optimize using wp-config

•  define('WP_CACHE', true);
•  define('WP_POST_REVISIONS', false);
   OR define('WP_POST_REVISIONS', 10);
•  define('EMPTY_TRASH_DAYS', 30);
•  define(‘WP_HOME’,‘http://vinayp.com.np’);
•  define(‘WP_SITEURL’,‘http://
   vinayp.com.np’);
•  define('WP_ALLOW_REPAIR', true);
Optimize using htaccess	
  

•  Gzip File Compression
<ifModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/
    xml application/xhtml+xml text/css text/javascript application/
    javascript application/x-javascript

</ifModule>	
  	
  	
  
•  Disable Etags
    Header unset Etag

    FileETag None     	
  	
  
Optimize using htaccess

•  Use Browser Caching
 # BEGIN Expire headers
 <ifModule mod_expires.c>
 ExpiresActive On
 ExpiresDefault "access plus 5 seconds"
 ExpiresByType image/x-icon "access plus 2592000 seconds"
 ExpiresByType image/jpeg "access plus 2592000 seconds"
 ExpiresByType image/png "access plus 2592000 seconds"
 ExpiresByType image/gif "access plus 2592000 seconds"
 ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
 ExpiresByType text/css "access plus 604800 seconds"
 ExpiresByType text/javascript "access plus 216000 seconds"
 ExpiresByType application/javascript "access plus 216000 seconds"
 ExpiresByType application/x-javascript "access plus 216000 seconds"
 ExpiresByType text/html "access plus 600 seconds"
 ExpiresByType application/xhtml+xml "access plus 600 seconds"
 </ifModule>
 # END Expire headers
OpDmize	
  using	
  Server	
  
•  Server Caching
  – opcode cache like Alternative PHP Cache
    (APC), XCache, Memcache, eAccelerator, etc
Optimize Database

•  Try phpMyAdmin
Optimize Database

•  Try plugin to optimize
  – WP-Optimize (http://wordpress.org/extend/
    plugins/wp-optimize)
  – OpDmize	
  DB	
  (h:p://yoast.com/wordpress/
    opDmize-­‐db/)	
  
•  Automatic Database Repair
  – {$your_site}/wp-­‐admin/maint/repair.php
•  Don’t backup your database during
   high traffic time
•  Use Following Queries on Footer
Optimize Database
•  Cache Your Database
•  Delete Spam Comments
References

•  h:p://codex.wordpress.org/
   WordPress_OpDmizaDon	
  
•  h:p://codex.wordpress.org/
   WordPress_OpDmizaDon/Caching	
  
•  h:p://wp.tutsplus.com/tutorials/hosDng/
   opDmizing-­‐wordpress-­‐loading-­‐speed-­‐with-­‐
   header-­‐php-­‐htaccess/	
  
•  h:p://wp.smashingmagazine.com/2012/06/26/
   diy-­‐caching-­‐methods-­‐wordpress/	
  
•  h:p://sixrevisions.com/css/css-­‐sprites-­‐site-­‐
   speed/	
  
Thank	
  You	
  
QuesDons?	
  

More Related Content

What's hot

Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Think Media Inc.
 
High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010Barry Abrahamson
 
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 TrivandrumWordPress Trivandrum
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019Anam Ahmed
 
3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress PerformanceRF Studio
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Dave Wallace
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress IIBarry Abrahamson
 
Drupal Installation &amp; Configuration
Drupal Installation &amp; ConfigurationDrupal Installation &amp; Configuration
Drupal Installation &amp; ConfigurationAnil Mishra
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depthSanjay Willie
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPressBarry Abrahamson
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007Barry Abrahamson
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14slobodanmanic
 
Week1 Introduction
Week1 IntroductionWeek1 Introduction
Week1 IntroductionRowena LI
 
All about word press
All about word pressAll about word press
All about word pressDan Beil
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website OptimizationRadu Pintilie
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projectsAndreas Jung
 

What's hot (20)

Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010High Performance WordPress - WordCamp Jerusalem 2010
High Performance WordPress - WordCamp Jerusalem 2010
 
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 At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance3 Hacks to Improve WordPress Performance
3 Hacks to Improve WordPress Performance
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 
Drupal Installation &amp; Configuration
Drupal Installation &amp; ConfigurationDrupal Installation &amp; Configuration
Drupal Installation &amp; Configuration
 
WordPress CLI in-depth
WordPress CLI in-depthWordPress CLI in-depth
WordPress CLI in-depth
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
Week1 Introduction
Week1 IntroductionWeek1 Introduction
Week1 Introduction
 
Introduction to Web Designing
Introduction to Web DesigningIntroduction to Web Designing
Introduction to Web Designing
 
All about word press
All about word pressAll about word press
All about word press
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
Drupal
DrupalDrupal
Drupal
 
Pragmatic plone projects
Pragmatic plone projectsPragmatic plone projects
Pragmatic plone projects
 

Similar to Vinay Paudel: Optimizing and Speeding up a WordPress site

Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimizationpaudelvinay
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
Harder, Better, Faster, Stronger
Harder, Better, Faster, StrongerHarder, Better, Faster, Stronger
Harder, Better, Faster, StrongerDavid Engel
 
Optimizing WordPress - WordPress SF Meetup April 2012
Optimizing WordPress -  WordPress SF Meetup April 2012Optimizing WordPress -  WordPress SF Meetup April 2012
Optimizing WordPress - WordPress SF Meetup April 2012Ben Metcalfe
 
WordPress Security
WordPress SecurityWordPress Security
WordPress SecurityIvan Storck
 
Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Ben Metcalfe
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshopBoston WordPress
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereStephen Bell
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsCgColors
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sitesJason Yingling
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: FrontendVõ Duy Tuấn
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and SecurityThink Media Inc.
 
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 codeDanilo Ercoli
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Morten Rand-Hendriksen
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPressJohannes Siipola
 

Similar to Vinay Paudel: Optimizing and Speeding up a WordPress site (20)

Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
High performance website
High performance websiteHigh performance website
High performance website
 
Harder, Better, Faster, Stronger
Harder, Better, Faster, StrongerHarder, Better, Faster, Stronger
Harder, Better, Faster, Stronger
 
Optimizing WordPress - WordPress SF Meetup April 2012
Optimizing WordPress -  WordPress SF Meetup April 2012Optimizing WordPress -  WordPress SF Meetup April 2012
Optimizing WordPress - WordPress SF Meetup April 2012
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 
Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)Optimizing WordPress (WordCamp Philly 2011)
Optimizing WordPress (WordCamp Philly 2011)
 
WCBos13 intermediate workshop
WCBos13 intermediate workshopWCBos13 intermediate workshop
WCBos13 intermediate workshop
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get there
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 
The WordPress Way
The WordPress WayThe WordPress Way
The WordPress Way
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Heavy Web Optimization: Frontend
Heavy Web Optimization: FrontendHeavy Web Optimization: Frontend
Heavy Web Optimization: Frontend
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
 
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
 
Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0Building the next generation of themes with WP Rig 2.0
Building the next generation of themes with WP Rig 2.0
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 

More from wpnepal

Mahadev Subedi: WordPress Security & Defense Mechanism
Mahadev Subedi: WordPress Security & Defense MechanismMahadev Subedi: WordPress Security & Defense Mechanism
Mahadev Subedi: WordPress Security & Defense Mechanismwpnepal
 
Pankaj Agrawal: eLearning on WordPress
Pankaj Agrawal: eLearning on WordPressPankaj Agrawal: eLearning on WordPress
Pankaj Agrawal: eLearning on WordPresswpnepal
 
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...wpnepal
 
Ujwal Thapa: WordPress as a Blogging Platform
Ujwal Thapa: WordPress as a Blogging PlatformUjwal Thapa: WordPress as a Blogging Platform
Ujwal Thapa: WordPress as a Blogging Platformwpnepal
 
Yalamber Subba: WordPress Jobs & Freelance Marketplaces
Yalamber Subba: WordPress Jobs & Freelance MarketplacesYalamber Subba: WordPress Jobs & Freelance Marketplaces
Yalamber Subba: WordPress Jobs & Freelance Marketplaceswpnepal
 
Utsav Singh Rathour: How, Why and Where to use WordPress multisite
Utsav Singh Rathour: How, Why and Where to use WordPress multisiteUtsav Singh Rathour: How, Why and Where to use WordPress multisite
Utsav Singh Rathour: How, Why and Where to use WordPress multisitewpnepal
 
Rabin Shrestha: Data Validation and Sanitization in WordPress
Rabin Shrestha: Data Validation and Sanitization in WordPressRabin Shrestha: Data Validation and Sanitization in WordPress
Rabin Shrestha: Data Validation and Sanitization in WordPresswpnepal
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic siteswpnepal
 
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 minsChandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 minswpnepal
 
Jimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina DesignJimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina Designwpnepal
 
Bigyan Ghimire: GovtPress
Bigyan Ghimire: GovtPressBigyan Ghimire: GovtPress
Bigyan Ghimire: GovtPresswpnepal
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPresswpnepal
 
Kris Thapa: WP Ambulance
Kris Thapa: WP AmbulanceKris Thapa: WP Ambulance
Kris Thapa: WP Ambulancewpnepal
 
Chandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPressChandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPresswpnepal
 
Simple Contact Us Plugin Development
Simple Contact Us Plugin DevelopmentSimple Contact Us Plugin Development
Simple Contact Us Plugin Developmentwpnepal
 
WP Ambulance
WP AmbulanceWP Ambulance
WP Ambulancewpnepal
 
How to earn and maximize your earnings from your Blog - Pawan Agrawal
How to earn and maximize your earnings from your Blog - Pawan AgrawalHow to earn and maximize your earnings from your Blog - Pawan Agrawal
How to earn and maximize your earnings from your Blog - Pawan Agrawalwpnepal
 

More from wpnepal (17)

Mahadev Subedi: WordPress Security & Defense Mechanism
Mahadev Subedi: WordPress Security & Defense MechanismMahadev Subedi: WordPress Security & Defense Mechanism
Mahadev Subedi: WordPress Security & Defense Mechanism
 
Pankaj Agrawal: eLearning on WordPress
Pankaj Agrawal: eLearning on WordPressPankaj Agrawal: eLearning on WordPress
Pankaj Agrawal: eLearning on WordPress
 
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...
Jimba Tamang: 5 reasons why “Parallax Websites” are awesome and how to create...
 
Ujwal Thapa: WordPress as a Blogging Platform
Ujwal Thapa: WordPress as a Blogging PlatformUjwal Thapa: WordPress as a Blogging Platform
Ujwal Thapa: WordPress as a Blogging Platform
 
Yalamber Subba: WordPress Jobs & Freelance Marketplaces
Yalamber Subba: WordPress Jobs & Freelance MarketplacesYalamber Subba: WordPress Jobs & Freelance Marketplaces
Yalamber Subba: WordPress Jobs & Freelance Marketplaces
 
Utsav Singh Rathour: How, Why and Where to use WordPress multisite
Utsav Singh Rathour: How, Why and Where to use WordPress multisiteUtsav Singh Rathour: How, Why and Where to use WordPress multisite
Utsav Singh Rathour: How, Why and Where to use WordPress multisite
 
Rabin Shrestha: Data Validation and Sanitization in WordPress
Rabin Shrestha: Data Validation and Sanitization in WordPressRabin Shrestha: Data Validation and Sanitization in WordPress
Rabin Shrestha: Data Validation and Sanitization in WordPress
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
 
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 minsChandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
 
Jimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina DesignJimba Tamang: Responsive and Retina Design
Jimba Tamang: Responsive and Retina Design
 
Bigyan Ghimire: GovtPress
Bigyan Ghimire: GovtPressBigyan Ghimire: GovtPress
Bigyan Ghimire: GovtPress
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
Kris Thapa: WP Ambulance
Kris Thapa: WP AmbulanceKris Thapa: WP Ambulance
Kris Thapa: WP Ambulance
 
Chandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPressChandra Maharzan: Making a successful career out of WordPress
Chandra Maharzan: Making a successful career out of WordPress
 
Simple Contact Us Plugin Development
Simple Contact Us Plugin DevelopmentSimple Contact Us Plugin Development
Simple Contact Us Plugin Development
 
WP Ambulance
WP AmbulanceWP Ambulance
WP Ambulance
 
How to earn and maximize your earnings from your Blog - Pawan Agrawal
How to earn and maximize your earnings from your Blog - Pawan AgrawalHow to earn and maximize your earnings from your Blog - Pawan Agrawal
How to earn and maximize your earnings from your Blog - Pawan Agrawal
 

Vinay Paudel: Optimizing and Speeding up a WordPress site

  • 1.
  • 2. Op#mizing  &   Speeding  Up  a   WordPress  Site  
  • 3. Vinay  Paudel   tweet  @paudelvinay   Email:  paudelvinay@gmail.com   Blog  :  h:p://vinayp.com.np  
  • 5. Facts/Results •  80-­‐90%  of  the  end-­‐user  response  Dme  is  spent   downloading  all  the  components  in  the  page:   images,  stylesheets,  scripts,  Flash,  etc   •  Site  having  loading  Dme  more  than  5  minutes   loose  50%  visitors.   •  Less  H:p  Request,  More  fastest  the  site  
  • 8. Optimize theme •  well-coded theme. •  Find any unclose tag on theme •  Check malicious/unwanted code – Theme  AuthenDcity  Checker  (TAC)  (h:p:// wordpress.org/extend/plugins/tac/)   – Exploit  Scanner  (h:p://wordpress.org/extend/ plugins/exploit-­‐scanner/)  
  • 9. Optimize theme •  Images – Replace some of the images with text – Use GIF, PNG and JPEG format – Try WP-Smush
  • 11. Optimize theme   •  Combine minify and compress HTML, JS and CSS – Use compressor tools – Use Plugins •  WP Minify (http://wordpress.org/extend/plugins/wp- minify/ ) •  Better WordPress Minify (http://wordpress.org/extend/ plugins/bwp-minify/) •  Put CSS on header and JavaScript on footer  
  • 12. Optimize theme   •  Non Persistent caching
  • 13. Optimize theme   •  Persistent caching
  • 14. Optimize/Speed up Plugins •  Be selective on plugins choice.
  • 16. Optimize/Speed up Plugins   •  Deactivate and delete unnecessary plugins
  • 18. Optimize/Speed up Plugins   •  Check  plugins  performance   – P3  (Plugin  Performance  Profiler)  (h:p:// wordpress.org/extend/plugins/p3-­‐profiler/)  
  • 20. Cache Using Plugins •  Caching Plugins – W3 Total Cache (http://wordpress.org/extend/ plugins/w3-total-cache/) – WP Super Cache (http://wordpress.org/extend/ plugins/wp-super-cache/)
  • 21. Apply CDN using Plugins   •  CDN (content delivery Network). – W3 Total Cache – image files, js files, css files, uploaded files
  • 22. Optimize using wp-config •  define('WP_CACHE', true); •  define('WP_POST_REVISIONS', false); OR define('WP_POST_REVISIONS', 10); •  define('EMPTY_TRASH_DAYS', 30); •  define(‘WP_HOME’,‘http://vinayp.com.np’); •  define(‘WP_SITEURL’,‘http:// vinayp.com.np’); •  define('WP_ALLOW_REPAIR', true);
  • 23. Optimize using htaccess   •  Gzip File Compression <ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml application/ xml application/xhtml+xml text/css text/javascript application/ javascript application/x-javascript </ifModule>       •  Disable Etags Header unset Etag FileETag None    
  • 24. Optimize using htaccess •  Use Browser Caching # BEGIN Expire headers <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 5 seconds" ExpiresByType image/x-icon "access plus 2592000 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ExpiresByType image/png "access plus 2592000 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" ExpiresByType text/css "access plus 604800 seconds" ExpiresByType text/javascript "access plus 216000 seconds" ExpiresByType application/javascript "access plus 216000 seconds" ExpiresByType application/x-javascript "access plus 216000 seconds" ExpiresByType text/html "access plus 600 seconds" ExpiresByType application/xhtml+xml "access plus 600 seconds" </ifModule> # END Expire headers
  • 25. OpDmize  using  Server   •  Server Caching – opcode cache like Alternative PHP Cache (APC), XCache, Memcache, eAccelerator, etc
  • 27. Optimize Database •  Try plugin to optimize – WP-Optimize (http://wordpress.org/extend/ plugins/wp-optimize) – OpDmize  DB  (h:p://yoast.com/wordpress/ opDmize-­‐db/)   •  Automatic Database Repair – {$your_site}/wp-­‐admin/maint/repair.php •  Don’t backup your database during high traffic time •  Use Following Queries on Footer
  • 28. Optimize Database •  Cache Your Database •  Delete Spam Comments
  • 29. References •  h:p://codex.wordpress.org/ WordPress_OpDmizaDon   •  h:p://codex.wordpress.org/ WordPress_OpDmizaDon/Caching   •  h:p://wp.tutsplus.com/tutorials/hosDng/ opDmizing-­‐wordpress-­‐loading-­‐speed-­‐with-­‐ header-­‐php-­‐htaccess/   •  h:p://wp.smashingmagazine.com/2012/06/26/ diy-­‐caching-­‐methods-­‐wordpress/   •  h:p://sixrevisions.com/css/css-­‐sprites-­‐site-­‐ speed/