How To Enable Gzip Compression

Table of contents:

How To Enable Gzip Compression
How To Enable Gzip Compression

Video: How To Enable Gzip Compression

Video: How To Enable Gzip Compression
Video: How to Enable GZIP Compression in WordPress 2024, December
Anonim

Gzip compression can reduce the amount of data sent to the user when loading a page on the Internet. This makes it possible to significantly increase the speed of the site's appearance in the browser window due to the special dynamic compression algorithm used.

How to enable gzip compression
How to enable gzip compression

It is necessary

  • - Hosting that supports php.ini editing;
  • - FTP client.

Instructions

Step 1

To enable the Gzip compression mode, you need to use a special directive in php.ini. This file allows you to customize the execution of scripts written in the PHP programming language, which makes it possible to fine-tune the work of all programs running on the server. You can open php.ini using any text editor. The location of the file depends on the settings of your hosting provider and the software used on the servers.

Step 2

Use an FTP manager to go to your website or use the hosting provider's control panel. Some companies allow users to edit configuration files directly, through an editor window built into the control panel. If the menu item for changing php.ini is missing, and you can not find the file location while browsing the site structure via FTP, your hosting has disabled such settings.

Step 3

If you know that the hoster allows configuring php.ini, but you cannot find this file, create an info.php document and enter the code: Save the changes in the file and upload it to the server, and specify the appropriate path in the browser address bar (for example,

Step 4

The page that appears will display the PHP settings. The php.ini address will be written in the Loaded Configuration File line.

Step 5

Download the configuration file to your computer and open it with any text editor. To do this, right-click on the document and select "Open with".

Step 6

In the window that appears, find the following line: zlib.output_compression = Off Change its value to On: zlib.output_compression = On

Step 7

Save your changes and upload the file using an FTP client back to the server, replacing it. Gzip compression is enabled.

Step 8

Go to the website and test the compression work across different browsers. If you are having problems loading pages, Gzip should be disabled.

Recommended: