{"id":2637,"date":"2022-09-29T09:57:17","date_gmt":"2022-09-29T09:57:17","guid":{"rendered":"https:\/\/tronsdev.com\/tronsit.au\/?p=1708"},"modified":"2022-09-29T09:57:17","modified_gmt":"2022-09-29T09:57:17","slug":"gzip-compression-in-wordpress","status":"publish","type":"post","link":"https:\/\/tronsdev.com\/tronsit\/gzip-compression-in-wordpress\/","title":{"rendered":"GZIP Compression in WordPress"},"content":{"rendered":"<h1>How to Enable GZIP Compression in WordPress<\/h1>\n<p>With changing dynamics of search engine optimisation and growing competition, websites today need faster loading speed. A website\u2019s page speed determines the success of your multiple SEO practices to rank your website among the top SERPs-search engine result pages. One of the initial practices to optimise your site\u2019s page speed is by enabling <strong>GZIP Compression<\/strong>. Once that your page speed gets an evident boost, search engines take less time to crawl into your website and analyse it.<\/p>\n<h3>What is page speed?<\/h3>\n<p>Page speed is the measurement of timespan required to completely load a webpage.<\/p>\n<h3>What is GZIP Compression and How it Impacts Page Speed?<\/h3>\n<p>Every time a user visits a website, the browser tends to download multiple code files stored on web server and decodes them to display a complete website. By enabling GZIP Compression on a WordPress site, you allow your webserver to provide smaller sized files that take less time to load, this ultimately boosts the page speed. With GZIP Compression enabled on WordPress, the Java script, CSS and HTML files get compressed and minified to provide faster page speed.<br \/>\n<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-1709 size-full\" src=\"https:\/\/tronsdev.com\/tronsit\/wp-content\/uploads\/2022\/09\/download-650x433-1-1.jpg\" alt=\"\" width=\"650\" height=\"433\" \/><\/p>\n<h3>How to Enable GZIP Compression in WordPress?<\/h3>\n<p>GZIP Compression in WordPress needs to be enabled on the server-side. Many hosting companies like Kinsta and GoDaddy provide GZIP Compression as part of hosting packages, others however, do not. Once that you have determined that GZIP is not enabled on your WordPress site, start with the process.<br \/>\nThe only way to manually enable GZIP Compression on a WordPress site is to edit its <strong>.htaccess<\/strong> file. Here how you can do it\u2026<\/p>\n<ul>\n<li><strong>Create A Backup<\/strong><\/li>\n<\/ul>\n<p>Editing a .htaccess file is crucial. To avoid any risk of crashing down your website, create a copy of your original WordPress files and create a secure backup.<br \/>\nThe .htaccess file is present in the root folder of your website, however, the file is hidden by default.<br \/>\nTo enable access to the file use File Transfer Protocol (FTP) or access them via cPanel. Once that you locate .htaccess file, download it to make changes on your hard drive or start editing it directly. By downloading the file, you lower down the risk of crashing your website.<\/p>\n<ul>\n<li><strong>Start Editing<\/strong><\/li>\n<\/ul>\n<p>Force hidden files to show and start editing. Add the following code provided by GTmetrix to your .htaccess file:<\/p>\n<pre># Compress HTML, CSS, JavaScript, Text, XML and fonts\nAddOutputFilterByType DEFLATE application\/javascript\nAddOutputFilterByType DEFLATE application\/rss+xml\nAddOutputFilterByType DEFLATE application\/vnd.ms-fontobject\nAddOutputFilterByType DEFLATE application\/x-font\nAddOutputFilterByType DEFLATE application\/x-font-opentype\nAddOutputFilterByType DEFLATE application\/x-font-otf\nAddOutputFilterByType DEFLATE application\/x-font-truetype\nAddOutputFilterByType DEFLATE application\/x-font-ttf\nAddOutputFilterByType DEFLATE application\/x-javascript\nAddOutputFilterByType DEFLATE application\/xhtml+xml\nAddOutputFilterByType DEFLATE application\/xml\nAddOutputFilterByType DEFLATE font\/opentype\nAddOutputFilterByType DEFLATE font\/otf\nAddOutputFilterByType DEFLATE font\/ttf\nAddOutputFilterByType DEFLATE image\/svg+xml\nAddOutputFilterByType DEFLATE image\/x-icon\nAddOutputFilterByType DEFLATE text\/css\nAddOutputFilterByType DEFLATE text\/html\nAddOutputFilterByType DEFLATE text\/javascript\nAddOutputFilterByType DEFLATE text\/plain\nAddOutputFilterByType DEFLATE text\/xml\n\n# Remove browser bugs (only needed for really old browsers)\nBrowserMatch ^Mozilla\/4 gzip-only-text\/html\nBrowserMatch ^Mozilla\/4\\.0[678] no-gzip\nBrowserMatch \\bMSIE !no-gzip !gzip-only-text\/html\nHeader append Vary User-Agent<\/pre>\n<ul>\n<li><strong>Save and Run<\/strong><\/li>\n<\/ul>\n<p>Save the changes and replace your original .htaccess file. Once those changes are saved, run your website on a GZIP Compression Checker to make sure that GZIP Compression is enabled successfully.<br \/>\n<strong>Enable GZIP Compression by using a plugin<\/strong><br \/>\nWhere there is WordPress there is always a Plugin available to make your tasks easy.<br \/>\nWP Rocket is a caching plugin that automatically adds GZIP Compression to your .htaccess file. This makes your WordPress load faster by just a few clicks!<br \/>\nWant to share feedback? Be part of the conversation, comment below!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Enable GZIP Compression in WordPress With changing dynamics of search engine optimisation and growing competition, websites today need faster loading speed. A website\u2019s page speed determines the success of your multiple SEO practices to rank your website among the top SERPs-search engine result pages. One of the initial practices to optimise your site\u2019s &#8230; <a title=\"GZIP Compression in WordPress\" class=\"read-more\" href=\"https:\/\/tronsdev.com\/tronsit\/gzip-compression-in-wordpress\/\" aria-label=\"Read more about GZIP Compression in WordPress\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":1710,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[26],"class_list":["post-2637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website-development","tag-website-development"],"_links":{"self":[{"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/posts\/2637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/comments?post=2637"}],"version-history":[{"count":0,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/posts\/2637\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/media\/1710"}],"wp:attachment":[{"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/media?parent=2637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/categories?post=2637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tronsdev.com\/tronsit\/wp-json\/wp\/v2\/tags?post=2637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}