forum share
   textsms      forum    


INDEX \ Articole/intrebari \ Increase WordPress Speed Using .htaccess

Increase WordPress Speed Using .htaccess

text_format+  text_format-

Gzip File Compression

Apache servers

Using mod_pagespeed Apache module developed by Google.

ModPagespeed on

Web hosts with mod_pagespeed GoDaddy, DreamHost, EdgeCast, SiteGround and MediaTemple.

mod_deflate module

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript

Nginx servers

To enable gzip compression for Nginx servers you need this code in your .htaceess

server {
gzip on;
gzip_types text/html text/css application/x-javascript text/plain text/xml image/x-icon;

Browser Caching

Apache Servers

# BEGIN Expire headers

ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2500000 seconds"
ExpiresByType image/jpeg "access plus 2500000 seconds"
ExpiresByType image/png "access plus 2500000 seconds"
ExpiresByType image/gif "access plus 2500000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
ExpiresByType text/css "access plus 600000 seconds"
ExpiresByType text/javascript "access plus 200000 seconds"
ExpiresByType application/javascript "access plus 200000 seconds"
ExpiresByType application/x-javascript "access plus 200000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"

# END Expire headers

.htaccess rules for setting up Cache-control header:

# BEGIN Cache-Control Headers

Header set Cache-Control "public"

Header set Cache-Control "public"

Header set Cache-Control "private"

Header set Cache-Control "private, must-revalidate"

# END Cache-Control Headers

MySQL Database Size

Disable the revisions feature alltogether by inserting the following code snippet in your wp-config.php:

define('WP_POST_REVISIONS', false );

You can increase WordPress speed, using CDNs (content delivery networks) or applying performance best practices using .htaccess.

update Ultima actualizare: 23/01/2017
done Informatiile cuprinse in aceasta sectiune sunt verificate si actualizate periodic.

list Articole recente
arrow_back Inapoi

© 2023 EVIDWEB. Toate drepturile rezervate. Design: EVIDWEB

share  forum  textsms