admin管理员组文章数量:1130349
I'm redesigning a site that originally didn't have a SSL. I copied the uploads directory, then did regular expressions on the wp db export file from the original site.
In the Media Library, none of the thumbnails are showing up.
In the developer console it is showing a bunch of requests to the root of the domain, rather than having the image names.
If I go to the URL that shows up in the inspector and use the https version, the image appears.
I've already tried wp media regenerate, but they still are not showing up. Where do I need to go to change the protocol the media library is using?
I'm redesigning a site that originally didn't have a SSL. I copied the uploads directory, then did regular expressions on the wp db export file from the original site.
In the Media Library, none of the thumbnails are showing up.
In the developer console it is showing a bunch of requests to the root of the domain, rather than having the image names.
If I go to the URL that shows up in the inspector and use the https version, the image appears.
I've already tried wp media regenerate, but they still are not showing up. Where do I need to go to change the protocol the media library is using?
1 Answer
Reset to default 0Okay, the issue was my last regular expression that changed the http: to https: did not save. I reran the expression again and refreshed the page and it worked.
Here's the gist of how to do this (with wp cli) for anyone who comes across this.
In the original site directory:
wp db export
This should create a .sql file with the original database name and a hash, like db_name-324ddsx9.sql. FTP that file to your new server/install directory. Then edit it with vi and perform the search and replace. You want to replace all instances of the original domain with the new one.
sudo vi db_name-324ddsx9.sql
:%s/oldsite_name/newsite_name/g
:%s/http\:\/\/newsite/https\:\/\/newsite/g
:wq
If you haven't already, create the mysql database. Then from the command line - import the sql.
mysql -u root -p database_name < db_name-324ddsx9.sql
And that should have you set to go.
I'm redesigning a site that originally didn't have a SSL. I copied the uploads directory, then did regular expressions on the wp db export file from the original site.
In the Media Library, none of the thumbnails are showing up.
In the developer console it is showing a bunch of requests to the root of the domain, rather than having the image names.
If I go to the URL that shows up in the inspector and use the https version, the image appears.
I've already tried wp media regenerate, but they still are not showing up. Where do I need to go to change the protocol the media library is using?
I'm redesigning a site that originally didn't have a SSL. I copied the uploads directory, then did regular expressions on the wp db export file from the original site.
In the Media Library, none of the thumbnails are showing up.
In the developer console it is showing a bunch of requests to the root of the domain, rather than having the image names.
If I go to the URL that shows up in the inspector and use the https version, the image appears.
I've already tried wp media regenerate, but they still are not showing up. Where do I need to go to change the protocol the media library is using?
1 Answer
Reset to default 0Okay, the issue was my last regular expression that changed the http: to https: did not save. I reran the expression again and refreshed the page and it worked.
Here's the gist of how to do this (with wp cli) for anyone who comes across this.
In the original site directory:
wp db export
This should create a .sql file with the original database name and a hash, like db_name-324ddsx9.sql. FTP that file to your new server/install directory. Then edit it with vi and perform the search and replace. You want to replace all instances of the original domain with the new one.
sudo vi db_name-324ddsx9.sql
:%s/oldsite_name/newsite_name/g
:%s/http\:\/\/newsite/https\:\/\/newsite/g
:wq
If you haven't already, create the mysql database. Then from the command line - import the sql.
mysql -u root -p database_name < db_name-324ddsx9.sql
And that should have you set to go.
本文标签: wp adminHow to make Media Library use HTTPS
版权声明:本文标题:wp admin - How to make Media Library use HTTPS? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749063824a2310504.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论