1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[share] cara simple "boost up" kecepatan themes wordpress anda

Discussion in 'Wordpress' started by afiliasi21, Mar 24, 2011.

  1. adsene

    adsene Super Hero

    Joined:
    Nov 17, 2009
    Messages:
    1,010
    Likes Received:
    64
    klo nggak gitu pake object cache punya w3 total cache...sama udah tercache ga pake ngerubah theme sih :D
     
  2. udintech

    udintech Super Hero

    Joined:
    May 11, 2010
    Messages:
    793
    Likes Received:
    10
    Location:
    antara Rupiah sama $$$$
    niche info gan
     
  3. Dudayz

    Dudayz Super Hero

    Joined:
    Feb 6, 2009
    Messages:
    3,847
    Likes Received:
    522
    Location:
    Bogor Kota Panas
    Itu grade A karena tidak banyak akses kode javascript yang identik dengan iklan liat aja webnya kosong dengan iklan. Di akses oleh negara manapun bakal tetep grade A karena ya tadi itu javascriptna dikit yang di load

    Sekedar tambahan gzip compression via htaccess kodenya dibawah ini

    PHP:
    #####################################################
    # CONFIGURE media caching
    #
    # Header unset Expires
    # Turn on Expires and set default expires to 3 days
    ExpiresActive On
    ExpiresDefault A259200
     
    # Set up caching on media files for 1 month
    <FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$">
      
    ExpiresDefault A29030400
      Header append Cache
    -Control "public"
    </FilesMatch>
     
    # Set up 2 Hour caching on commonly updated files
    <FilesMatch "\.(xml|txt|html|js|css)$">
      
    ExpiresDefault A604800
      Header append Cache
    -Control "private, must-revalidate"
    </FilesMatch>
     
    # Force no caching for dynamic files
    <FilesMatch "\.(php|cgi|pl|htm)$">
      
    ExpiresDefault A0
      Header set Cache
    -Control "no-store, no-cache, must-revalidate, max-age=0"
      
    Header set Pragma "no-cache"
    </FilesMatch>
    #
    #####################################################
     
    <IfModule mod_deflate.c>
    <
    FilesMatch "\.(js|css)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    </
    IfModule>
     
    <
    IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_keep_workfiles No
    mod_gzip_can_negotiate Yes
    mod_gzip_add_header_count Yes
    mod_gzip_send_vary Yes
    mod_gzip_command_version 
    '/mod_gzip_status'
    mod_gzip_min_http 1000
    mod_gzip_minimum_file_size 300
    mod_gzip_maximum_file_size 512000
    mod_gzip_maximum_inmem_size 60000
    mod_gzip_handle_methods GET POST
    mod_gzip_temp_dir 
    /tmp
    mod_gzip_item_include file 
    \.html$
    mod_gzip_item_include file \.php$
    mod_gzip_item_include file \.pl$
    mod_gzip_item_include file \.rb$
    mod_gzip_item_include file \.py$
    mod_gzip_item_include file \.cgi$
    mod_gzip_item_include file \.css$
    mod_gzip_item_include file \.js$
    mod_gzip_item_include mime ^application/javascript$
    mod_gzip_item_include mime ^application/x-javascript$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^httpd/unix-directory$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include handler ^server-status$
    mod_gzip_item_include handler ^server-info$
    mod_gzip_item_include handler ^application/x-httpd-php
    mod_gzip_item_exclude mime 
    ^image/.*
    </
    IfModule>
    Jangan lupa tambahin wp-minify jangan pake minify bawaannya w3 total cache.
    </div></div>
     
  4. muizzaddin

    muizzaddin Super Hero

    Joined:
    Apr 3, 2010
    Messages:
    1,246
    Likes Received:
    182
    Location:
    Kalibata
    tambahan dikit, klo blog ente banyak pake image ane usulin pake cdn
    read more here http://mark.ossdl.de/2009/08/rewriting-urls-for-wordpress-and-cdn/
     
  5. afiliasi21

    afiliasi21 Super Hero

    Joined:
    Jun 19, 2010
    Messages:
    1,753
    Likes Received:
    395
    Location:
    Kulkas emak
    cdn --> h__p://en.wikipedia.org/wiki/Content_delivery_network

    hehe....bisa aja gan.... tapi ribet...., itu mungkin cocok untuk situs gede.....diatas 200K uv/day mungkin......
    dan cocok untuk para developer web......dan klo enggak bisa settingnnya mungkin tuh wp jadi error...

    mungkin lebih baik difokusin di seo ama backlink ......:D
     
  6. ngingas

    ngingas Ads.id Fan

    Joined:
    Jul 15, 2010
    Messages:
    120
    Likes Received:
    0
    makasih infonya mas bro, ane praktekin dech
     
  7. afiliasi21

    afiliasi21 Super Hero

    Joined:
    Jun 19, 2010
    Messages:
    1,753
    Likes Received:
    395
    Location:
    Kulkas emak
    silahkan di praktekan dan kasih tahu efeknya nanti :D
     
  8. cupu_belagu

    cupu_belagu Super Hero

    Joined:
    May 11, 2011
    Messages:
    1,896
    Likes Received:
    208
    Location:
    SALATIGA
    mantab gan...
    hilangin white space juga ngaruh ga yah gan?
     
  9. afiliasi21

    afiliasi21 Super Hero

    Joined:
    Jun 19, 2010
    Messages:
    1,753
    Likes Received:
    395
    Location:
    Kulkas emak
    white spece maksudnya...imagenya?..... ya ngarus pasti..hilangin image background yang enggak perlu
     
  10. muhrochim

    muhrochim Ads.id Pro

    Joined:
    Oct 14, 2009
    Messages:
    259
    Likes Received:
    0
    Location:
    Bintaro
    sip mas bro, coba ane praktekin ya
     
  11. afiliasi21

    afiliasi21 Super Hero

    Joined:
    Jun 19, 2010
    Messages:
    1,753
    Likes Received:
    395
    Location:
    Kulkas emak

    iya sih oom.....tapi kan cache juga makan databasenya oom....kalo cache penuh ya podo bae lola .... :D cmiiw
     
  12. enthung

    enthung Ads.id Fan

    Joined:
    May 31, 2011
    Messages:
    136
    Likes Received:
    1
    wah.. dapet pencerahan nih..

    ane kok gak tau ya cara ngilangin gravatarnya dari comment.php?
     
  13. petr_ind

    petr_ind Super Hero

    Joined:
    Jul 11, 2010
    Messages:
    1,862
    Likes Received:
    195
    Location:
    Jawa Barat
    ane udah nyoba emang nambahin kecepatan load...
    mungkin servernya ga terlalu berat jadinya
     
  14. redsupercup6

    redsupercup6 Ads.id Starter

    Joined:
    Jul 2, 2011
    Messages:
    69
    Likes Received:
    0
    Location:
    <?php echo "ane disini gan" ; ?>
    woww..mantep mas bro..:senyum: saya sudah mencoba dan alhamdulillah berhasil..:)..terima kasih atas ilmunya masbro..terus semangat..:senyum:..web ane jadi lmyan cepat..:senyum:
     
  15. eazyshare

    eazyshare Ads.id Fan

    Joined:
    Oct 16, 2009
    Messages:
    171
    Likes Received:
    0
    mantap bro izin praktekin
     
  16. GrafitianZ

    GrafitianZ Super Hero

    Joined:
    Nov 6, 2010
    Messages:
    3,445
    Likes Received:
    202
    Location:
    JakCity
    mantab juga nih triknya,langsung tak coba bro :D
     
  17. amrikarisma

    amrikarisma Ads.id Pro

    Joined:
    Jan 9, 2011
    Messages:
    432
    Likes Received:
    10
    Location:
    Yogyakarta
    ane pake yang biaa aja deh, keliatanya beti (beda tipis). :senyum:
     
  18. ryanriatno

    ryanriatno Newbie

    Joined:
    Sep 5, 2011
    Messages:
    19
    Likes Received:
    0
    Location:
    Depok
    Pake service dari Cloudflare (gratis) dengan fitur berikut:

    • Globally-distributed network
    • Secure, redundant DNS
    • Anycast routing technology
    • Automatic static content caching
    • Always online
    • Resource analysis and optimization
    • Website preloader
    Jadi kita menggunakan CDN(Content Delivery Network) gratis karena globally distributed network dan Cloudflare berfungsi sebagai Proxy. Dan untungnya kalau host kita itu down, maka web kita masih bisa diakses (Read only mode) karena dicache oleh cloudflare. Dan masih banyak lagi alasannya terutama masalah security :D.

    Untuk installasi pertama signup , ikuti petunjuk disana lalu install plugin untuk WordPress. Jangan lupa untuk setting ulang nameserver :).

    Dan sebagai tambahan ini settingan .htaccess saya :
    Code:
    # proc/self/environ? no way!
    RewriteCond %{QUERY_STRING} proc/self/environ [OR]
    
    # Block out any script trying to set a mosConfig value through the URL
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    
    # Block out any script trying to base64_encode crap to send via URL
    RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
    
    # Block out any script that includes a <script> tag in URL
    RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
    
    # Block out any script trying to set a PHP GLOBALS variable via URL
    RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
    
    # Block out any script trying to modify a _REQUEST variable via URL
    RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
    
    # Send all blocked request to homepage with 403 Forbidden error!
    RewriteRule ^(.*)$ index.php [F,L]
    
    # SECURE WP-CONFIG.PHP
    <Files wp\-config\.php>
     Order Deny,Allow
     Deny from all
    </Files>
    
    # block visitors referred from indicated domains
    <IfModule mod_rewrite.c>
    SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
    SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
    Deny from env=HTTP_SAFE_BADBOT
    </ifModule>
    
    <IfModule mod_setenvif.c>
      <IfModule mod_headers.c>
        BrowserMatch MSIE ie
        Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
      </IfModule>
    </IfModule>
    
    <FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
      </IfModule>
    </FilesMatch>
    
    # video
    AddType video/ogg  ogg ogv
    AddType video/mp4  mp4
    AddType video/webm webm
    
    # Proper svg serving. Required for svg webfonts on iPad
    AddType image/svg+xml                 svg svgz 
    
    # webfonts
    AddType application/vnd.ms-fontobject eot
    AddType font/ttf                      ttf
    AddType font/otf                      otf
    AddType font/x-woff                   woff
    AddType text/cache-manifest           manifest
    
    # gzip compression
    <IfModule mod_deflate.c>
    
    # force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
    <IfModule mod_setenvif.c>
      <IfModule mod_headers.c>
        SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
        RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
      </IfModule>
    </IfModule>
    # html, txt, css, js, json, xml, htc:
    <IfModule filter_module>
      FilterDeclare   COMPRESS
      FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
      FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
      FilterChain     COMPRESS
      FilterProtocol  COMPRESS  change=yes;byteranges=no
    </IfModule>
    
    <IfModule !mod_filter.c>
      # Legacy versions of Apache
      AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
      AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript 
      AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    </IfModule>
    
    # webfonts and svg:
      <FilesMatch "\.(ttf|otf|eot|svg)$" >
        SetOutputFilter DEFLATE
      </FilesMatch>
    </IfModule>
    
    <IfModule mod_expires.c>
      Header set cache-control: public
      ExpiresActive on
    
    # Perhaps better to whitelist expires rules? Perhaps.
      ExpiresDefault                          "access plus 1 month"
    
    # cache.manifest needs re-reqeusts in FF 3.6 (thx Remy ~Introducing HTML5)
      ExpiresByType text/cache-manifest       "access plus 0 seconds"
    
    # your document html 
      ExpiresByType text/html                  "access"
    
    # rss feed
      ExpiresByType application/rss+xml       "access plus 1 hour"
    
    # favicon (cannot be renamed)
      ExpiresByType image/vnd.microsoft.icon  "access plus 1 week" 
    
    # media: images, video, audio
      ExpiresByType image/png                 "access plus 1 month"
      ExpiresByType image/jpg                 "access plus 1 month"
      ExpiresByType image/jpeg                "access plus 1 month"
      ExpiresByType video/ogg                 "access plus 1 month"
      ExpiresByType audio/ogg                 "access plus 1 month"
      ExpiresByType video/mp4                 "access plus 1 month"
      
    # webfonts
      ExpiresByType font/ttf                  "access plus 1 month"
      ExpiresByType font/woff                 "access plus 1 month"
      ExpiresByType image/svg+xml             "access plus 1 month"
      
    # css and javascript
      ExpiresByType text/css                  "access plus 1 month"
      ExpiresByType application/javascript    "access plus 1 month"
      ExpiresByType text/javascript           "access plus 1 month"
    </IfModule>
    
    # Since we're sending far-future expires, we don't need ETags for
    # static content.
    FileETag None
    
    # you probably want www.example.com to forward to example.com -- shorter URLs are sexier.
    #   no-www.org/faq.php?q=class_b
    #RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist (e.g. “/blog/hello”)
    Options -MultiViews 
    # -Indexes will have Apache block users from browsing folders without a default document
    Options -Indexes
    
    # use utf-8 encoding for anything served text/plain or text/html
    AddDefaultCharset utf-8
    # force utf-8 for a number of file formats
    AddCharset utf-8 .html .css .js .xml .json .rss
    
     
  19. Yogy Anggry

    Yogy Anggry Super Hero

    Joined:
    Sep 11, 2009
    Messages:
    813
    Likes Received:
    17
    Location:
    Jogja
    wah bener juga, jadi gak perlu eksekusi koding phpnya kalo langsng ditulis
     

Share This Page