Optimizing &Speeding Up aWordPress Site
Vinay Paudel  tweet @paudelvinayEmail: paudelvinay@gmail.comBlog : http://vinayp.com.np
Wordpress Structure
Facts/Results• 80-90% of the end-user response time is spent  downloading all the components in the page:  images, stylesh...
Facts/Results
Facts/Results
Optimize theme• well-coded theme.• Find any unclose tag on theme• Check malicious/unwanted code  – Theme Authenticity Chec...
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...
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)    (http://wordpress.org/extend/p...
Optimize/Speed up Plugins
Cache Using Plugins• Caching Plugins  – W3 Total Cache    (http://wordpress.org/extend/plugins/w3-total-    cache/)  – WP ...
Apply CDN using Plugins• CDN (content delivery Network).  – W3 Total Cache  – image files, js files, css files, uploaded f...
Optimize using wp-config• define(WP_CACHE, true);• define(WP_POST_REVISIONS, false);  OR define(WP_POST_REVISIONS, 10);• d...
Optimize using htaccess• Gzip File Compression<ifModule mod_deflate.c>  AddOutputFilterByType DEFLATE text/html text/plain...
Optimize using htaccess• Use Browser Caching # BEGIN Expire headers <ifModule mod_expires.c> ExpiresActive On ExpiresDefau...
Optimize using Server• Server Caching  – opcode cache like Alternative PHP Cache    (APC), XCache, Memcache, eAccelerator,...
Optimize Database• Try phpMyAdmin
Optimize Database• Try plugin to optimize  – WP-Optimize   (http://wordpress.org/extend/plugins/wp-optimize)  – Optimize D...
Optimize Database• Cache Your Database• Delete Spam Comments
References• http://codex.wordpress.org/WordPress_Optimiza  tion• http://codex.wordpress.org/WordPress_Optimiza  tion/Cachi...
Thank YouQuestions?
Wordpress optimization
Upcoming SlideShare
Loading in...5
×

Wordpress optimization

685

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
685
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • wp_cache_add( $key, $data, $group, $expire )wp_cache_set( $key, $data, $group, $expire )wp_cache_get( $key, $group )
  • Wordpress optimization

    1. 1. Optimizing &Speeding Up aWordPress Site
    2. 2. Vinay Paudel tweet @paudelvinayEmail: paudelvinay@gmail.comBlog : http://vinayp.com.np
    3. 3. Wordpress Structure
    4. 4. Facts/Results• 80-90% of the end-user response time is spent downloading all the components in the page: images, stylesheets, scripts, Flash, etc• Site having loading time more than 5 minutes loose 50% visitors.• Less Http Request, More fastest the site
    5. 5. Facts/Results
    6. 6. Facts/Results
    7. 7. Optimize theme• well-coded theme.• Find any unclose tag on theme• Check malicious/unwanted code – Theme Authenticity Checker (TAC) (http://wordpress.org/extend/plugins/tac/) – Exploit Scanner (http://wordpress.org/extend/plugins/exploit- scanner/)
    8. 8. Optimize theme• Images – Replace some of the images with text – Use GIF, PNG and JPEG format – Try WP-Smush
    9. 9. Optimize theme• Use CSS Sprites
    10. 10. 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
    11. 11. Optimize theme• Non Persistent caching
    12. 12. Optimize theme• Persistent caching
    13. 13. Optimize/Speed up Plugins• Be selective on plugins choice.
    14. 14. Optimize/Speed up Plugins
    15. 15. Optimize/Speed up Plugins• Deactivate and delete unnecessary plugins
    16. 16. Optimize/Speed up Plugins
    17. 17. Optimize/Speed up Plugins• Check plugins performance – P3 (Plugin Performance Profiler) (http://wordpress.org/extend/plugins/p3- profiler/)
    18. 18. Optimize/Speed up Plugins
    19. 19. 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/)
    20. 20. Apply CDN using Plugins• CDN (content delivery Network). – W3 Total Cache – image files, js files, css files, uploaded files
    21. 21. 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);
    22. 22. Optimize using htaccess• Gzip File Compression<ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x ml application/xhtml+xml text/css text/javascript application/javascript applic ation/x-javascript</ifModule>• Disable Etags Header unset Etag FileETag None
    23. 23. 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
    24. 24. Optimize using Server• Server Caching – opcode cache like Alternative PHP Cache (APC), XCache, Memcache, eAccelerator, etc
    25. 25. Optimize Database• Try phpMyAdmin
    26. 26. Optimize Database• Try plugin to optimize – WP-Optimize (http://wordpress.org/extend/plugins/wp-optimize) – Optimize DB (http://yoast.com/wordpress/optimize-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
    27. 27. Optimize Database• Cache Your Database• Delete Spam Comments
    28. 28. References• http://codex.wordpress.org/WordPress_Optimiza tion• http://codex.wordpress.org/WordPress_Optimiza tion/Caching• http://wp.tutsplus.com/tutorials/hosting/optimiz ing-wordpress-loading-speed-with-header-php- htaccess/• http://wp.smashingmagazine.com/2012/06/26/d iy-caching-methods-wordpress/• http://sixrevisions.com/css/css-sprites-site- speed/
    29. 29. Thank YouQuestions?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×