Sofia WP User Group Presentation

360 views

Published on

I used this presentation for the meeting of the WP Sofia User Group during February 2014.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
360
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sofia WP User Group Presentation

  1. 1. WordPress Server 
 Optimizations Даниел Канчев WordPress Sofia User Group Февруари 2014
  2. 2. Даниел Канчев @dvkanchev Performance Guru @SiteGround Security Freak Server Migrations Specialist VIP Customer Management FOSS Addict Addicted to extreme sports
  3. 3. Защо трябва да оптимизирате? По-доволни потребители —>> $$$ По-добри позиции в Google/Yandex По-ниски разходи за web hosting
  4. 4. Направете план
  5. 5. Основни моменти в оптимизацията Web server setup - Apache or nginx PHP setup - PHP-FPM, FastCGI, APC MySQL setup Object caching - Memcached/Redis Full page (HTTP) caching - Varnish, nginx
  6. 6. MySQL Използвайте Percona - http://www.percona.com/ Използвайте tmpfs за MySQL tmpdir - http://goo.gl/ UOTjlW MySQLtuner.pl - http://mysqltuner.pl
  7. 7. PHP PHP handlers - DSO, SuPHP/SuExec, FastCGI/PHP-FPM PHP modules info Opcode caching, object caching - APC, xCache, Memcached, Redis
  8. 8. WordPress Interaction with Your Database First request goes to the database server
  9. 9. Object Caching First request goes to the database server Objects are also stored in Memcached
  10. 10. Object Caching All consecutive requests are forwarded to the Memcached server
  11. 11. How PHP Works Scanning Lexing Parsing Compilation Opcode Execution
  12. 12. PHP Opcode Caching ! Opcode Execution
  13. 13. Reverse Proxy Servers
  14. 14. Reverse Proxy Servers
  15. 15. Reverse Proxy Servers
  16. 16. Reverse Proxy Servers
  17. 17. nginx config which works http://polihronov.wordpress.com/
  18. 18. Varnish config # Never cache administrator if (req.url ~ "wp-(login|admin)" || req.url ~ "preview=true") { return (pass); } if (req.http.Cookie ~ "(^|;s*)(wpSGCacheBypass=1)(;|$)") { return(pass); } if (req.http.Cookie ~ "(^|;s*)wordpress_logged_in_([^;]+)(;|$)") { return(pass); } if (req.http.Cookie ~ "(^|;s*)(woocommerce_items_in_cart=1)(;|$)") { return(pass); } if (req.http.Cookie ~ "comment_author") { return(pass); } ! include "common.vcl"; ! return (lookup);
  19. 19. To CDN or not to CDN ?
  20. 20. Изводи Оптимизацията е процес, а не събитие. Винаги тествайте. Пазете информацията от всички тестове. Информирайте се от големите акули.
  21. 21. Полезни линкове http://highscalability.com/ http://www.mysqlperformanceblog.com/ http://wiki.nginx.org/WordPress http://velocityconf.com/
  22. 22. Bash Мерси! @dvkanchev / daniel.k@siteground.com

×