Wordpress
Sep29

Percepatan web wordpress dengan HTACCESS

Ktzagcplugin free agcplugin
Iklan

Percepatan web wordpress dengan HTACCESS untuk mengaktifkan beberapa fitur di server dan cache yang lebih baik, seperti expired header dan lain lain.

Berikut step by stepnya:

Langkah awal masuk ke wp_config.php terus taruh script:

define(‘WP_CACHE’, true);

setelah kode:

<?php 

di paling atas kode.

1. Jika di root folder anda tidak ditemukan file .HTACCESS, buat file baru dengan menggunakan editor notepad atau notepad++. Lihat gambar dibawah ini:

Klik gambar untuk melihat gambar dengan ukuran sebenernya.

htaccess notepad

htaccess notepad

2. Lalu isikan kode berikut di file .htaccess tersebut

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 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

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers

# BEGIN Compress text files
<ifModule mod_deflate.c>
<filesMatch "\.(css|js|x?html?|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
# END Compress text files

# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
</IfModule>
<FilesMatch "\.(css|js|htc|CSS|JS|HTC)$">
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.2.5"
</IfModule>
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.2.5"
</IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.2.5"
</IfModule>
</FilesMatch>
# END W3TC Browser Cache

Lalu save.

3. Setelah itu upload file tersebut di root folder wordpress ente. Lihat contohnya dalam bentuk gambar:

htaccess cpanel

htaccess cpanel

4 Selesai dan sekarang coba refresh browser anda, lihat perbedaan kecepetan sebelum dan sesudah menggunakan HTACCESS ini, jangan lupa di cek juga skor kecepatan website anda di GTMETRIX.

Update artikel 06/10/2013

Berikut adalah htaccess dan performancenya mendapat nilai +3 di page speed dan +7 di yslow dari nilai jika menggunakan HTACCESS diatas. Tergantung terhadap masing masing kondisi, dan ini adalah HTACCESS buat cache HTML5 dan CSS3 juga, berikut adalah kodenya.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# Apache Server Configs v1.1.0 | MIT License
# https://github.com/h5bp/server-configs-apache

# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
# to the main server config file (usually called `httpd.conf`), you should add
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.

# ##############################################################################
# # CROSS-ORIGIN RESOURCE SHARING (CORS) #
# ##############################################################################

# ------------------------------------------------------------------------------
# | Cross-domain AJAX requests |
# ------------------------------------------------------------------------------

# Enable cross-origin AJAX requests.
# http://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
# http://enable-cors.org/

# <IfModule mod_headers.c>
# Header set Access-Control-Allow-Origin "*"
# </IfModule>

# ------------------------------------------------------------------------------
# | CORS-enabled images |
# ------------------------------------------------------------------------------

# Send the CORS header for images when browsers request it.
# https://developer.mozilla.org/en/CORS_Enabled_Image
# http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# http://hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(gif|ico|jpe?g|png|svgz?|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>

# ------------------------------------------------------------------------------
# | Web fonts access |
# ------------------------------------------------------------------------------

# Allow access from all domains for web fonts

<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

# ##############################################################################
# # INTERNET EXPLORER #
# ##############################################################################

# ------------------------------------------------------------------------------
# | Better website experience |
# ------------------------------------------------------------------------------

# Force IE to render pages in the highest available mode in the various
# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.

<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
# `mod_headers` can't match based on the content-type, however, we only
# want to send this header for HTML pages and not for the other resources
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>

# ------------------------------------------------------------------------------
# | Cookie setting from iframes |
# ------------------------------------------------------------------------------

# Allow cookies to be set from iframes in IE.

# <IfModule mod_headers.c>
# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
# </IfModule>

# ------------------------------------------------------------------------------
# | Screen flicker |
# ------------------------------------------------------------------------------

# Stop screen flicker in IE on CSS rollovers (this only works in
# combination with the `ExpiresByType` directives for images from below).

# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
# BrowserMatch "Opera" !brokenvary
# SetEnvIf brokenvary 1 force-no-vary

# ##############################################################################
# # MIME TYPES AND ENCODING #
# ##############################################################################

# ------------------------------------------------------------------------------
# | Proper MIME types for all files |
# ------------------------------------------------------------------------------

<IfModule mod_mime.c>

# Audio
AddType audio/mp4 m4a f4a f4b
AddType audio/ogg oga ogg

# JavaScript
# Normalize to standard type (it's sniffed in IE anyways):
# http://tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js
AddType application/json json

# Video
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv

# Web fonts
AddType application/font-woff woff
AddType application/vnd.ms-fontobject eot

# Browsers usually ignore the font MIME types and sniff the content,
# however, Chrome shows a warning if other MIME types are used for the
# following fonts.
AddType application/x-font-ttf ttc ttf
AddType font/opentype otf

# Make SVGZ fonts work on iPad:
# https://twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz

# Other
AddType application/octet-stream safariextz
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-shockwave-flash swf
AddType application/x-web-app-manifest+json webapp
AddType application/x-xpinstall xpi
AddType application/xml atom rdf rss xml
AddType image/webp webp
AddType image/x-icon ico
AddType text/cache-manifest appcache manifest
AddType text/vtt vtt
AddType text/x-component htc
AddType text/x-vcard vcf

</IfModule>

# ------------------------------------------------------------------------------
# | UTF-8 encoding |
# ------------------------------------------------------------------------------

# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
AddDefaultCharset utf-8

# Force UTF-8 for certain file formats.
<IfModule mod_mime.c>
AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
</IfModule>

# ------------------------------------------------------------------------------
# | Secure Sockets Layer (SSL) |
# ------------------------------------------------------------------------------

# Rewrite secure requests properly to prevent SSL certificate warnings, e.g.:
# prevent `https://www.example.com` when your certificate only allows
# `https://secure.example.com`.

# <IfModule mod_rewrite.c>
# RewriteCond %{SERVER_PORT} !^443
# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
# </IfModule>

# ------------------------------------------------------------------------------
# | HTTP Strict Transport Security (HSTS) |
# ------------------------------------------------------------------------------

# Force client-side SSL redirection.

# If a user types "example.com" in his browser, the above rule will redirect
# him to the secure version of the site. That still leaves a window of oppor-
# tunity (the initial HTTP connection) for an attacker to downgrade or redirect
# the request. The following header ensures that browser will ONLY connect to
# your server via HTTPS, regardless of what the users type in the address bar.
# http://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec-14#section-6.1
# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/

# (!) Remove the `includeSubDomains` optional directive if the subdomains are
# not using HTTPS.

# <IfModule mod_headers.c>
# Header set Strict-Transport-Security "max-age=16070400; includeSubDomains"
# </IfModule>

# ------------------------------------------------------------------------------
# | Server software information |
# ------------------------------------------------------------------------------

# Avoid displaying the exact Apache version number, the description of the
# generic OS-type and the information about Apache's compiled-in modules.

# ADD THIS DIRECTIVE IN THE `httpd.conf` AS IT WILL NOT WORK IN THE `.htaccess`!

# ServerTokens Prod

# ##############################################################################
# # WEB PERFORMANCE #
# ##############################################################################

# ------------------------------------------------------------------------------
# | Compression |
# ------------------------------------------------------------------------------

<IfModule mod_deflate.c>

# Force compression for mangled headers.
# http://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*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>

# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
# and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
# as `AddOutputFilterByType` is still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>

</IfModule>

# ------------------------------------------------------------------------------
# | Content transformations |
# ------------------------------------------------------------------------------

# Prevent some of the mobile network providers from modifying the content of
# your site: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5.

# <IfModule mod_headers.c>
# Header set Cache-Control "no-transform"
# </IfModule>

# ------------------------------------------------------------------------------
# | ETag removal |
# ------------------------------------------------------------------------------

# Since we're sending far-future expires headers (see below), ETags can
# be removed: http://developer.yahoo.com/performance/rules.html#etags.

# `FileETag None` is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>

FileETag None

# ------------------------------------------------------------------------------
# | Expires headers (for better cache control) |
# ------------------------------------------------------------------------------

# The following expires headers are set pretty far in the future. If you don't
# control versioning with filename-based cache busting, consider lowering the
# cache time for resources like CSS and JS to something like 1 week.

<IfModule mod_expires.c>

ExpiresActive on
ExpiresDefault "access plus 1 month"

# CSS
ExpiresByType text/css "access plus 1 year"

# Data interchange
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"

# Favicon (cannot be renamed!)
ExpiresByType image/x-icon "access plus 1 week"

# HTML components (HTCs)
ExpiresByType text/x-component "access plus 1 month"

# HTML
ExpiresByType text/html "access plus 0 seconds"

# JavaScript
ExpiresByType application/javascript "access plus 1 year"

# Manifest files
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"

# Media
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"

# Web feeds
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"

# Web fonts
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"

</IfModule>

# ------------------------------------------------------------------------------
# | Filename-based cache busting |
# ------------------------------------------------------------------------------

# If you're not using a build process to manage your filename version revving,
# you might want to consider enabling the following directives to route all
# requests such as `/css/style.12345.css` to `/css/style.css`.

# To understand why this is important and a better idea than `*.css?v231`, read:
# http://stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring

# <IfModule mod_rewrite.c>
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
# </IfModule>

# ------------------------------------------------------------------------------
# | File concatenation |
# ------------------------------------------------------------------------------

# Allow concatenation from within specific CSS and JS files, e.g.:
# Inside of `script.combined.js` you could have
# <!--#include file="libs/jquery.js" -->
# <!--#include file="plugins/jquery.idletimer.js" -->
# and they would be included into this single file.

# <IfModule mod_include.c>
# <FilesMatch "\.combined\.js$">
# Options +Includes
# AddOutputFilterByType INCLUDES application/javascript application/json
# SetOutputFilter INCLUDES
# </FilesMatch>
# <FilesMatch "\.combined\.css$">
# Options +Includes
# AddOutputFilterByType INCLUDES text/css
# SetOutputFilter INCLUDES
# </FilesMatch>
# </IfModule>

# ------------------------------------------------------------------------------
# | Persistent connections |
# ------------------------------------------------------------------------------

# Allow multiple requests to be sent over the same TCP connection:
# http://httpd.apache.org/docs/current/en/mod/core.html#keepalive.

# Enable if you serve a lot of static content but, be aware of the
# possible disadvantages!

<IfModule mod_headers.c>
Header set Connection Keep-Alive
</IfModule>

Silahkan download file htaccessnya dalam bentuk zip di link download dibawah:

Like dulu, setelah itu link download akan otomatis keluar dengan sendiri..

You must like for see the content!!

Kalau masih bingung silahkan kirim komentar, sebisa mungkin ane jawab. :)

Last Update 22/03/2014

Tags:
Iklan
Rate this article!

Author: 

Freelance designer, tidak terpaku sama yang namanya waktu, hobby mengunjungi localhost setelah itu baru OL. Suka pusing kalau melihat kode kode yang aneh. :| Jangan lupa add ane di link social newtwork dibawah.

author

Related Posts "Percepatan web wordpress dengan HTACCESS"

35 Responses

  1. author

    Produk Marketing3 years ago

    panjang banget code htaccess nya bro :-) muda-mudahan bisa cocok dengan semua hosting, BTW tolong dibuatkan settingan penggunaan font di web ini mas bro,asyik membacanya karena fontnya pas.

    Reply
    • author
      Author

      admin3 years ago

      Untuk font gunakan default font size 14px, font heading gunakan gunakan open sans condensed (plus all weight and italyc)…

      Reply
  2. author

    villa di puncak3 years ago

    gan. untuk masukinitu apa bisa di htacces editor? ane pasang plugin htacces. maklum gan ini pertama kali ane pake WP :D biasanya ane pake blogcepot

    Reply
    • author
      Author

      admin3 years ago

      Bisa masbro, sama saja, yang penting htaccess ini di khususkan untuk wordpress… :)

      Reply
      • author

        villa di puncak3 years ago

        ok mas bro, thank’s bgt untuk pencerahannya, jangan kapok ya :D

        Reply
        • author
          Author

          admin3 years ago

          Oke sipp, asal sesuai topik, insyaallah ane jawab. :)

          Reply
  3. author

    adhit3 years ago

    gan, coba ku pasang di wp ane, tapi setelah dipasang, semua link mengarah ke phpmyadmin semua ya, di localhost. offline

    Reply
    • author
      Author

      admin3 years ago

      Ah yang bener gan??? Coba cek HTACCESS permalinknya yang berawalan
      # START WORDPRESS
      Blabla
      # END WORPDRESS

      Apakah sudah benar??

      Reply
  4. author

    aprilyon3 years ago

    mas…
    itu yg ada tanda # apah di hapus, apa cukup langsung di upload filenya??

    Reply
    • author
      Author

      admin3 years ago

      Itu udah jadi jangan di hapus itu # comment kalau # dihapus jadi kode bisa error. :D

      Reply
  5. author

    Beranda News3 years ago

    Sob, apakah ini sudah mengaktifkan GZIP? Skor GTmetrix ku pagespeed 88% yslow 67%, di page speed enable GZIP compression hanya dapat c 72, untuk yslow compress component with gzip malah cuma dapat F 0.

    Reply
    • author
      Author

      admin3 years ago

      Lihat kode paling bawah yang HTACCESS kedua, hidupkan keep alive, kode diatas:
      # <IfModule mod_headers.c>
      # Header set Connection Keep-Alive
      # </IfModule>

      Maka ubah jadi:
      <IfModule mod_headers.c>
      Header set Connection Keep-Alive
      </IfModule>

      Hpus tanda #

      Reply
  6. author

    Beranda News3 years ago

    wah susah juga ya, gak berubah masih tetap 88 pagespeed dan yslownya hanya 67, mungkin masalah di hosting kali ya makanya gak bisa hidup gzip. Di ySlow nya yang priority high dan dapat nilai F itu add expires headers, Make fewer HTTP requests, Compress components with gzip. Sedangkan di pagespeed kategory high Remove query strings from static resources (E), Enable gzip compression (C).

    Reply
  7. author
    Author

    admin3 years ago

    Query string itu tipe javascript dan css di wordpress yang ada querynya di belakang css dan js file ver=3.8.1 untuk wp 3.8.1. Itu standar wordpress, ane aja ane biarin, takut nanti tidak kompatible sama beberapa plugin, dll, kalau mau dihapus caranya tidak terlalu sulit, caranya:

    function _remove_script_version( $src ){
    $parts = explode( ‘?ver’, $src );
    return $parts[0];
    }
    add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );
    add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );

    Masukan di file includes/functions/function_core.php untuk theme kentooz. :D

    Untuk Prefer asynchronous resources itu berasal dari script luar mau dioptimasi cari script yang asyncron, biasanya dari developer menyediakan script asyn.

    Untuk YSLOW angkat tangan ane, karena itu berhubungan sama server… Hehehe, dioptimasi seperti apapun kalau server tidak mendkung percuma.. :D

    Reply
  8. author

    Beranda News3 years ago

    Hohoho iya, kayaknya server hosting sob yang berpengaruh pada GZIP, aku dah dapat di thread forumnya katanya:

    Secara default, server kami mendukung penggunaan mod_gzip, mod_deflate

    Untuk menggunakan Gzip, silahkan panggil fungsi ob_start(“ob_gzhandler”); pada bagian atas script anda. Juga jangan lupa untuk memanggil fungsi ob_flush(); pada bagian akhir script anda.

    Yah cuma aku gak tau cara terapinnya dimana aku nunggu balasan dari forum moga ada yang bisa batu. Oh iya sob makasih udah membantu neh. Btw aku lihat ada theme baru lagi neh, keren banget tampilannya tuh. Btw aku lihat theme-theme baru dah gak di post di kentooz ya sob?

    Reply
    • author
      Author

      admin3 years ago

      Taruh aja di script tiap .php root templatenya taruh kode ob_start(“ob_gzhandler”); setelah kode < ?php paling atas dan taruh kode ob_flush(); sebelum kode ?>

      Kalau gak yakin bisa, mending gak usah daripada error. :D

      Untuk themes ane sementara di ads-id dan di bostheme.com sama ane blast ke email yang sudah subscribe, nanti2 sih ane rencana mau perbaiki themes kentooz lagi, biar keliatan rapih baru posting disana. :D

      Reply
  9. author

    Beranda News3 years ago

    Sob, nemu settingan cache htaccess dari m-almi, lumayan dongkrak page speed webku yang tadinya mentok di 88 pakai htaccess ini, setelah coba pakai dari m-ali naik jadi 93. Cuma Yslownya gak berubah, nih sumbernya mungkin sobat bisa ngembangin n lebih powerfull http://m-alwi.com/cara-setting-expired-header.html

    Reply
    • author
      Author

      admin3 years ago

      Masih cepet punya ane 1 biji, perbedaan sama punya web mas alwi ane test di bostheme.com punya ane meraih angka 92 – 80 punya mas alwi 91 – 79… :D

      Sudah ane update artikelnya.. Penambahan kode define(‘WP_CACHE’, true); di wp-config.php

      Reply
  10. author

    Beranda News3 years ago

    Oh iya, Yslownya ternyata naik juga dari 67 jadi 69 dan Compress components with gzip di yslou walau masih dapat F tapi naik udah dapat poin 23 yg tadinya nol sedangkan di pagespeed enable gzipnya 97% A

    Reply
  11. author

    Ulas Berita3 years ago

    itu dimasukan semua apa yang update aja mas ?

    Reply
    • author
      Author

      admin3 years ago

      Yang update saja bro.. Jangan semuanya.

      Reply
  12. author

    Wayan3 years ago

    kalau sudah memakai plugin w3 total cache apa boleh memakai trik ini mas ?? mohon penjelasannya :)

    Reply
    • author
      Author

      admin3 years ago

      Ngga perlu ane rasa, tapi ane lebih suka pakai trik HTACCESS dan CDN jika dibandingkan dengan menggunakan plugin. :D

      Reply
  13. author

    yandirabali2 years ago

    wah . . mantap ini mas , aku coba pake mas. . . semoga bisa bantu loading web aku mas, btw nih theme prediksi ane memang pas . . ini themenya sangat fast loading mas , moga makin jaya ya mas, aku download dulu ya hhtaccesnya , thank mas , kentos.

    Reply
  14. author

    NFG2 years ago

    Aduh punya saya kok masih dapet D ya mas , padahal udah ngikutin petunjuknya .

    Reply
    • author
      Author

      admin2 years ago

      Sudah fixed kan yah. :D

      Reply
  15. author

    Tahta Laksana Dewanata2 years ago

    Mas, punya saya tetep itu bagaimana ?
    ini saya kirim ssnya
    Mohon bantuannya mas
    Terimakasih

    prntscr . com/4z6o9h

    Reply
  16. author

    rudy2 years ago

    gan saya sdh pasang plugin htaccess, tapi saya bingung mana yg harus di ganti? apakah semua di timpakan ke Content of the Htaccess file, mohon pecerahan :)

    file manakah yang di pakai gan, yg ada di htaccess.zip atau htaccess-update.zip

    saya pasang di ktz freak theme.

    Reply
    • author
      Author

      admin2 years ago

      file htaccess-update gan…

      Sesuaikan saja dengan HTACCESS yang ada, misal sudah generate biasanya ada kode diantara


      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ – [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]

      Nah taruh dibawah itu… :)

      Reply
  17. author

    yulianingsih2 years ago

    Mas admin, ini trik .htaccess ya,.
    .htaccess ntu buat apache kalo gak salah ya?,
    enah saya pakai webserver nginx, itu gimana triknya mas?
    makasi :)

    Reply
  18. author

    Nino2 years ago

    Ane masih bingung, dimana letaknya dan dimana harus memulainya? apa mesti masuk ke Cpanel?

    Reply
    • author
      Author

      admin2 years ago

      Yups, HTACCESS kan ada di root langsungnya jadi masuk dulu ke cpanel.

      Reply
  19. author

    Risalo2 years ago

    Asslm alkum admin ? ilmu sangat bermanfaat!
    Gni min, apakh di blogger bisa langsung pasang sprt wp? klu tdk bs apa ad solusi lain!
    sy cob pasang di htacces indohostinger, seperti bnyk artikel, namun cr menghubungknnya dari htacces yg dihosting terhubung ke blog sulit ditemukn, klu bgtu gimn mghbungkan min dri hostinger ke blog? Terima kasih.

    Reply
    • author
      Author

      admin2 years ago

      Google membatasi akses ke HTACCESS, ane kira emang tidak bisa, itu buat self hosting saja… :D

      Reply

Leave a reply "Percepatan web wordpress dengan HTACCESS"

Captcha: * Time limit is exhausted. Please reload CAPTCHA.