Speed up wordpress using .htaccess part 1
Very simple method to speed up websites that use wordpress as backend using .htaccess methodology
Add the below stuff whatever i have given in your .htaccess file simple.
gzip files
gzip allows you to compress files, so obviously that means they load faster. The code below will gzip html, text, css, js and php files:
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
Block spammers
After stopping spammers, we’re now blocking them too! Change the line deny from 123.346 etc to include the IP of said spammer.
<Limit GET POST PUT>
order allow, deny
allow from all
deny from 123.456.789
</LIMIT>
Use PHP compression
Another compression technique, this time for PHP. At this rate, your blog will be compressed to 1kb!
# php compression – use with caution
<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule>
Some more to be added.Will be doing that soon. Enjoy my post guys
One more thing always
Protect Your htaccess
# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
Related posts:
- Speed up wordpress using .htaccess part 2
- mod_security the Apache Module, The Apache Firewall blocking your website?
- WordPress Vulnerability
- Thirteen Simple Rules To Speed Up Your Website
- Custom Error Pages Using .htaccess
- Url rewriting examples using .htaccess
- Fix 500 Internal Server Error In WordPress
