In my previous article where i explain how to install memcache on my centos server to use on WordPress W3 Total Cache plugin. The next thing we will want to have on our W3 total cache plugin would be to optimize our html code. In WordPress W3 total cache plugin, it allows us to do that with Html tidy. Html tidy comes with PHP 5.2 and above. However, not all web hosting will provide you with this. If they do not, simply ask them to install it for you so that you can speed up your website for better seo score!
Installling HTML Tidy on Linux Centos
In order to install this on a centos merchant is pretty simple, all you have to do is issue the following command on your linux machine.
yum install -y php-tidy
if you can't find this, simply issue the following command to search for all tidy component in yum.
yum search tidy
the results shown will be the one you want to yum install it.
Installing HTML Tidy on cPanel Server
Well, in order to install html tidy, you can't simply use the command above as it will not work since cpanel blocks certain repo away. You can go to issue in following command and remove the link "exclude".
removing the exclude link will open up the repo that cpanel do not want you to have. However, this will not work. Like i said, html tidy comes with php 5.2 and above. This means that cPanel has disable this functionality and we all know that cPanel uses easyapache to install and configure our webserver in our linux machine. Hence, you should login to your cpanel account and visit easyapache as shown below,
click on EasyApache and Start customize until you see the button "exhaustive options list" as shown below,
click on it and search for the tidy as shown below,
tick on it and click on rebuild. Wait until its done and you will have the option HTML Tidy on your W3 total cache plugin for either you or your client. Once it is installed, you should head down to the option Minify as shown below
and start configure your html tidy 🙂