Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to encrypt images/css for https pages WordPress

Hi, I am using woocommerce and have an SSL certificate installed, I have 3 pages that I am serving over https, these are:

https://www.mysite.com/cart/
https://www.mysite.com/checkout/
https://www.mysite.com/my-account/

However the padlock icon is not showing as the images/css/js are serving over http.

Should I serve images/css/js on these 3 pages over https and the rest of the site over http? Or all of the site over https?

What is the best way to serve these files over https? Is there a plugin I can use or a bit of code to place in the header/footer to say 'if checkout page serve css files over https, if not then serve http'?

Thank you

Answers (2)

2015-06-19

Francisco Javier Carazo Gil answers:

Ross,

In order to avoid problems like the one showing in the image I would:
1) Change every request with HTTP in your theme of image, css and JS to HTTPS (directly in enqueues or srcs)
2) Look for some HTTP request of this kind in database
3) Serve the whole site with HTTPS

2015-06-19

MJ answers:

Hi Ross,

Further to Francisco's answer you might find these guides useful:

https://css-tricks.com/moving-to-https-on-wordpress/

And there's a plugin here which is old (might work, haven't tried it) but also has this guide on its FAQ page:

https://wordpress.org/plugins/wordpress-https/faq/

HTH