admin管理员组文章数量:1428875
I’m not a professional web developer so if it involves complicated code interventions I’ll probably need to pay someone.
However, I’ve just built a new WP site with Elementor, hosted by GOdaddy. Bought an SSL cert and all installed ok. Had familiar problem with site still showing as not secure and so tried all the fixes - clear cache, plugins, redirection, changing the file path on Elementor etc.
I can see though that all the media files are still http, and this may be the problem. If I delete them and upload again they still show as http. I don’t know how to change the media files to https.
Must have spent over 6 hours so far, and can’t figure out a fix. Weirdly, some browsers show the site as secure and others do not. The padlock appears sometimes and not others, on the same page! Www.careerchangenetwork.co.uk. Help!
I’m not a professional web developer so if it involves complicated code interventions I’ll probably need to pay someone.
However, I’ve just built a new WP site with Elementor, hosted by GOdaddy. Bought an SSL cert and all installed ok. Had familiar problem with site still showing as not secure and so tried all the fixes - clear cache, plugins, redirection, changing the file path on Elementor etc.
I can see though that all the media files are still http, and this may be the problem. If I delete them and upload again they still show as http. I don’t know how to change the media files to https.
Must have spent over 6 hours so far, and can’t figure out a fix. Weirdly, some browsers show the site as secure and others do not. The padlock appears sometimes and not others, on the same page! Www.careerchangenetwork.co.uk. Help!
Share Improve this question edited May 26, 2019 at 21:17 Tom J Nowell♦ 61.2k7 gold badges79 silver badges150 bronze badges asked May 26, 2019 at 20:01 Steve CoatesSteve Coates 11 silver badge1 bronze badge 1- note that you can get SSL certificates for free via letsencrypt, you don't have to pay unless you want extended validation certificates. It looks like your site is available over both http and https, you should be able to redirect all the http to https to solve your problem, but you'll need to ask godaddy how to do that – Tom J Nowell ♦ Commented May 26, 2019 at 21:18
2 Answers
Reset to default 1The media file item (really, a post type), has the URL of the media item as part of it's data. So if you upload a media item when your site is at http:, then the URL of the item is stored as one of the meta values of the item. (It will be stored as http://www.example/wp-content/uploads/whatever.jpg , for example.)
Since the URL is part of the stored data for the media item, then you need to use a Search and Replace plugin (my favorite is "Better Search and Replace") to replace all instances of http://www.example with https://www.example . (Backing up the database first, of course.)
That is not absolutely required. If you are using a standard redirect in your htaccess file to redirect all http requests to https, then the https URL will be served up by your server. A sample htaccess that would do this is this one; you should add that to your existing htaccess file at the top (before the 'Begin WordPress' lines).
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
It may be that URLs in your generated page will still have the http, instead of https, when you use the htaccess rule to rewrite the request. But using a Search/Replace plugin will fix the problem.
You might also look into these two methods to change your links:
- https://interconnectit/products/search-and-replace-for-wordpress-databases/
- https://wordpress/plugins/velvet-blues-update-urls/
It's the same principle as Better Search and Replace but maybe easier to handle.
本文标签: Hi do I change Media files that still show as http after installing ssl
版权声明:本文标题:Hi do I change Media files that still show as http after installing ssl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745461075a2659328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论