Enabling Gzip Compression for WordPress

Enabling gzip compression for a WordPress website is a great way to increase speed and performance. In short, gzip compression works by finding similar strings in a text file and replacing it temporarily, resulting in a smaller file size. HTML and CSS files have a lot of repetitive text and spaces, making gzip compression very effective. On the whole, it can reduce the size of a WordPress page by up to 50-70%.

There are a few ways to enable gzip compression:

• Enabling gzip compression via .htaccess file (recommended). A more detailed WordPress tutorial can be found here.
• Enabling gzip compression via WordPress plugins, such as GZip Ninja Speed.

One thing that you should keep in mind is that gzip compression may slightly increase CPU usage. If CPU is not an issue, then gzip compression is a really great way to optimize your WordPress site.

Other methods to Optimizing WordPress Performance

Most themes, plugins and social media add-ons use a lot of JavaScript which is by default loaded first when accessing a site. This will make the HTML and other visual contents appear only after the JS is loaded. You can defer parsing of JavaScript so that the visual elements appear faster, while various social media buttons and other content that uses JavaScript would be loaded afterwards. This is one of the techniques recommended by Google Developers that is often overlooked. In WordPress, you can easily do that by using plugins such as WP Deferred JavaScripts or Speed Booster Pack.

Using a Content Delivery Network

Implementing a content delivery network (CDN for short) will speed up WordPress by caching content in multiple data centers around the world. After a visitor enters your site, the content will be delivered by the nearest datacenter available resulting in a better front-end experience. CDNs also work great with WordPress caching plugins and there are free solutions to get you started. For example, CloudFlare has a free plan which provides both benefits of a CDN while protecting your site from DDoS attacks.

Removing Query Strings from Static Resources

GTMetrix and other optimization tools suggest removing query strings from CSS and JS in order to improve caching of those elements. The previously mentioned WordPress plugin Speed Booster Pack is among a few others that can help you with this task.

Enabling Lazy Loading

Generally, when a web page is opened, all the content is loaded instantly, which is called eager loading. Alternatively, it is possible to delay the initialization of some objects (such as images) until they are needed, which is called lazy loading. The most common practice is displaying images only when they are visible from the visitor’s viewpoint or in the screen. All you need to do in order to take advantage of this technique is install and enable a plugin such as Lazy Load or Rocket Lazy Load.


Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.

buttons=(Accept !) days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !