Disable mod_pagespeed (no server conf access, .htaccess doesn't work)

Viewed 64850

I have a Wordpress site that my client wants to validate perfectly (using W3C validator). One of the issues is Google's pagespeed, which seems to be enabled by default by hosting provider.

I try to disable mod_pagespeed in .htaccess file with the following, but it doesn't work for some reason:

<IfModule pagespeed_module>
    ModPagespeed off
</IfModule>

I can disable it by adding "?ModPagespeed=off" to URL, but this does not solve my problem.

Is there anything else I can try? I only have access via FTP (no server conf access, no c-panel access, etc.).

4 Answers

I had the same issue with my WordPress website, I had installed it on Google Cloud, and by default, the Application installed pagespeed mod for apache. But I found the solution on the Bitnami documentation page.

Check If PageSpeed Is Enabled

execute the command or edit conf file using FTP:

nano /opt/bitnami/apache2/conf/httpd.conf

And if you find these two lines:

Include conf/pagespeed.conf
Include conf/pagespeed_libraries.conf

That means pagespeed mod is enabled.

For Disable PageSpeed

execute the same command or edit conf file using FTP:

nano /opt/bitnami/apache2/conf/httpd.conf

Comment out the following lines as below:

#Include conf/pagespeed.conf
#Include conf/pagespeed_libraries.conf

Now restart the apache server

sudo /opt/bitnami/ctlscript.sh restart apache

Note:- As above mentioned, the command and the directory location would be changed depending on the Apache server location or your deployment application.

For a detailed article, check out the official Bitnami WordPress Documentation.

Related