Question

Wordpress does not serve images through https

Hi there, I have a problem with my WP 1-Click Installation.

I followed this tutorial on how to secure Apache with Let’s Encrypt on Ubuntu, which was really helpful, to install an SSL certificate on my DO server.

Now I can access the website via https, but all wordpress media (newly uploaded images as well) are still served via http. This results in a “Not secure because of mixed Media” warning message in the browser.

Having searched through various forums, I cannot seem to find a fix for this besides using wordpress plugins, what doesn’t seem to be a proper fix to me though.

Also, since having installed the SSL certificate, the website loads really slowly. Well, actually the content (HTML, CSS, Images) seem to be loading very quickly, but although all elements are visible and the site is interactive, it loads for 15s+ more afterwards. Does this have something to do with the mixed media issue?

Any help would be greatly appreciated!

Best regards, Christian


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
July 27, 2020
Accepted Answer

Hello, @cemu

You can use a plugin to do a search and replace in the database and update all the http references for the domain name and update them to be with https instead. You can make sure that the WP_HOME`` and SITE_URL``` are set to be with https as needed as sometimes this is the only bit that needs to be modified.

You can check out plugins like https://wordpress.org/plugins/better-search-replace/

As for the performance issue you can monitor the droplet’s resource usage and make sure it’s not a droplet/server wide issue rather than an issue with the website.

You can also check out our tutorial on How to Speed Up WordPress Asset Delivery Using DigitalOcean Spaces CDN

Hope that this helps! Regards, Alex

Hey alexdo, thanks for your quick answer! Okay we will go with a plugin then I guess. Seems to be working fine so far, I just thought it may not be the ideal solution.

Regarding the performance issues it seems that the svg logo was causing the long post-loading times. Not sure why, as it worked fine on the local installation, but going with a png version fixed it.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.