Hostrs

< All Topics
Print

Optimize Website

  1.  Log in to your cPanel>>Software>>SSH Access

In the “Software” section, click the “Optimize Website” linkicon.

cPanel optimize 01

You may see an “info” box about zlib compression. If you do see the note and you want to compress .php files, contact your host to see if zlib compression is available. If not, they may be able to enable it for you.

cPanel optimize 02

In the “Compress Content” section you have a few options. By default, the “Disabled” option is usually selected.

cPanel optimize 03

the “disabled” option is usually selected

The easiest and quickest way to take advantage of compression and optimize website content is to choose to compress everything that can be compressed.

To do that, select the “Compress All Content” option and click the “Update Settings” button.

cPanel optimize 04

select the “compress all content” option, and click the “update settings” button

Compressing Specific MIME Types
If you don’t want to compress all content, only specific types, select the “Compress the specified MIME types” option.

Every different kind of file used on your website has what’s called a MIME type.

For example, an HTML page is made up of text, so the MIME type is text/html. Your CSS file’s MIME type is text/css. A .json file is: application/json.

If you’re not sure of a MIME type for a file you use on your site, check the list from Mozilla.

You don’t have to enter most image types used on the web (i.e., .jpg and .png), as they are already compressed.

Enter the MIME types you wish to compress separated by a space.

The default entries are: text/html text/plain text/xml, and take note of the space separating each MIME type.

Click the “Update Settings” button.

cPanel optimize 05

select the “Compress the specified MIME types” option

How the “Compress Content” Tool Works
When you enable compression in cPanel, updates are made to the .htaccess file in the root or home directory of your site. If no .htaccess file is present, one will be created.

If you edit the .htaccess file yourself at some point in the future, make sure you don’t remove the entries made by this or other tools.

Optimized Website Content and Google
I mentioned Google earlier, and it’s worth mentioning again. For better or worse, as website owners, we all rely on Google to be found. To be discovered. Maybe a little, or maybe quite a bit, but Google figures into our strategies somewhere.

So it’s in our interest to do anything we can to make Google see our websites in a favorable light.

Some of the things Google wants us to do (or, let’s face it, is forcing us to do) are more difficult to implement. Mobile-compatibility and HTTPS is among those guidelines. But something like file compression, as you’ve seen, is very easy.

So enable it today and start reaping the immediate benefits.