Better WordPress Performance with htaccess

In this article I am going to describe some very basic steps you should do after you’ve finished a website and you are ready to publish it.

One of the most common things a WP developer is going to face is WordPress performance. You will find plenty of articles talking about this issue and suggest using a CDN or a Cache plugin e.t.c..

Some popular services to check how optimized is your website are: GTMetrix, pingdom, WebPagetest, Google PageSpeed, YSlow

No matter what service you will use there are some rules you must include into your htaccess file. Those are:

  • Set Pragma Headers
  • Leverage Browser Cache
  • gZip Compression
  • deflate Compression
  • Enable Keep-Alive

In order to fix those issues below enter those rules at the top of your htaccess file.

Do not forget to add the following rule after # END WordPress

Most of the times those rules are more than enough to improve website’s performance. Try it yourself to feel the difference!