• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Install Apache PageSpeed For WebP Conversion

By Abhishek Ghosh May 19, 2023 6:45 pm Updated on May 19, 2023

How to Install Apache PageSpeed For WebP Conversion

Advertisement

Google PageSpeed module, now Apache PageSpeed module works from the server side to perform a lot of work easier avoiding WordPress plugins or PHP snippets. The good thing is that it is free and offers a ton of features. The bad thing about the Apache PageSpeed module is that the result is inconsistent and sometimes hurt the page loading speed. It does not hurt to test this module’s support to convert to webp images, particularly if you are using an Apache HTTP server.

All guides on this website on server administration are for the Debian/Ubuntu users and this is not an exception. We assume that you have an Apache web server with WordPress running as a web application. Install the Mod PageSpeed WordPress plugin to have the control over purging the cache of PageSpeed from the WordPress admin.

 

Steps to Install Apache PageSpeed

 

It is tricky to install Mod PageSpeed:

Advertisement

---

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
apt update && apt upgrade -y
apt install wget apt-transport-https gnupg2 -y
## doc : https://www.modpagespeed.com/doc/download
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
dpkg -i mod-pagespeed-*.deb
apt-get -f install
ls -al
rm mod-pagespeed-stable_current_amd64.deb
# touch /etc/default/mod-pagespeed
## install the required modules which matches with your PHP version
php -v
# apt install imagemagick php7.2-imagick ffmpeg
# apt install imagemagick php7.4-imagick ffmpeg
# apt install imagemagick php8.0-imagick ffmpeg
# apt install imagemagick php8.1-imagick ffmpeg

Comment out this file:

Vim
1
nano /etc/apt/sources.list.d/mod-pagespeed.list

You have to manually update the package since there are odd issues with the signature. Enable the module if already not enabled:

Vim
1
a2enmod pagespeed

Navigate to /etc/apache2/sites-available/ and run an ls -al :

Vim
1
2
cd /etc/apache2/sites-available/
ls -al

There will be your virtual host config file for the HTTPS site. Within virtual host scope, add :

Vim
1
2
ModPagespeedFetchHttps enable
ModPagespeedRespectXForwardedProto on

Run a config test and gracefully reload:

Vim
1
2
apachectl configtest
/etc/init.d/apache2 reload

These are third-party modules and always restart, reload, start, and stop Apache via /etc/init.d/apache2 command
when you are using them else you may face this ${APACHE_RUN_DIR} is not defined error. Avoid using service apache2 restart command with these modules.

One of our readers had issues with modsecurity module.

How to Install Apache PageSpeed For WebP Conversion

 

Steps to Configure Apache PageSpeed

 

Open the settings file:

Vim
1
nano /etc/apache2/mods-available/pagespeed.conf

Our present discussion is about enabling these filters:

Vim
1
2
3
...
ModPagespeedEnableFilters collapse_whitespace,elide_attributes,convert_jpeg_to_webp,convert_to_webp_lossless,convert_to_webp_animated
...

You’ll get the documentation here: https://www.modpagespeed.com/doc/reference-image-optimize.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Install Apache PageSpeed For WebP Conversion

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • Google/Apache PageSpeed With HTTPS, HTTP/2 (Apache2, Ubuntu 18.04)

    Here is Guide Install Google/Apache PageSpeed With HTTPS, HTTP/2 With Apache2 on Ubuntu 18.04. Google Approached to Move PageSpeed to Apache Incubator.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy