简体   繁体   English

Wordpress HTTP和HTTPS错误

[英]Wordpress HTTP and HTTPS errors

I have a https-website which I wanted to try out with another hosting provider, which does not support ssl for its test accounts. 我有一个https-网站,我想与其他托管服务提供商一起试用,该提供商的测试帐户不支持ssl。 I have copied all my data and databases from my old web hosting server to the new hoster. 我已经将所有数据和数据库从旧的Web托管服务器复制到了新的Hoster。 I have replaced all https references in my database and in wordpress. 我已经替换了数据库和wordpress中的所有https引用。 I checked the html source code and no https call is done there. 我检查了html源代码,并且在那里没有https调用。

Problem : My javascript does not work on the page, the dev console says it renders a 404 error because it "Failed to load resource: the server responded with a status of 404 (Not Found) - https://example.de/wp-content/themes/mytheme/js/script.js ". 问题 :我的JavaScript无法在页面上运行,开发控制台说它会显示404错误,因为它“无法加载资源:服务器响应状态为404(未找到) -https://example.de/wp -content / themes / mytheme / js / script.js “。 Why does it make a https call there ? 为什么要在此处拨打https?

1) How did you migrate your website? 1)您是如何迁移网站的? Sometimes there are options with serialized arrays you can not just search/replace for HTTPS as this may not replace anything. 有时,序列化数组中有一些选项,您不能仅搜索/替换HTTPS,因为这可能无法替换任何内容。 For migrating your WordPress website use the following tool to convert the database (its de-facto standard): 要迁移WordPress网站,请使用以下工具转换数据库(事实上的标准):

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

This will most likely solve your problem and many others, too. 这很可能会解决您的问题以及其他许多问题。

2) Furthermore do a search and replace on the code of your Theme (you said you have already done it) 2)进一步搜索并替换您主题的代码(您说您已经完成了)

3) External URLs may be called with HTTPS so make sure its not an external call 3)可以使用HTTPS调用外部URL,因此请确保它不是外部调用

4) Check the server configuration of your new hosting provider - maybe the HTTPS is not the problem but there is something different in server configuration 4)检查新主机提供商的服务器配置-也许不是HTTPS的问题,但是服务器配置有所不同

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM