简体   繁体   English

Wordpress 网站安装 SSL 证书后无法正常工作

[英]Wordpress website not working properly after installing SSL certificate

I have installed the SSL certificate via Cpanel to my WP website.我已通过CpanelSSL证书安装到我的WP网站。 But right after installing it the UI of the website got disturbed.但是在安装它之后,网站的UI就受到了干扰。

Without SSL不带 SSL

在此处输入图像描述

With SSL带SSL

在此处输入图像描述

Update 1更新 1

I have looked into it and found out that CSS/JS is not properly loaded.我调查了一下,发现CSS/JS没有正确加载。 So I changed HTTP to HTTPS in my files where I was using it.所以我在我使用它的文件中将 HTTP 更改HTTP to HTTPS 。 But still, the issue is the same.但是,问题还是一样的。 Moreover, I am getting the below errors in my console.此外,我在控制台中收到以下错误。

在此处输入图像描述

Any help would be highly appreciated任何帮助将不胜感激

Its due to references of css/images/javascript etc that are not using the SSL (https) but use HTTP instead.这是由于对 css/images/javascript 等的引用没有使用 SSL (https),而是使用 HTTP。 I recommend to install Really Simple SSL plugin for the quickest solution.我建议安装真正简单的 SSL插件以获得最快的解决方案。 Another solution is to go and fix every incorrect reference but this can be a lot of work and may in some cases need advanced knowledge (editing database entries etc.)另一个解决方案是 go 并修复每个不正确的引用,但这可能需要大量工作,并且在某些情况下可能需要高级知识(编辑数据库条目等)

Check with your hosting company to properly configure HTTPS Redirects.请咨询您的托管公司以正确配置 HTTPS 重定向。 The hosting company may ask you to install an HTTPS redirect plugin on your website.托管公司可能会要求您在您的网站上安装 HTTPS 重定向插件。 If that's work out then good if not, then go to PHPmyAdmin of your cPanel and Export your database.如果这成功了,那么如果没有,那就好,然后 go 到您的 cPanel 的 PHPmyAdmin 并导出您的数据库。 Open the database in Notepad++ and replace all http with https.在 Notepad++ 中打开数据库,将所有 http 替换为 https。 Save the file.保存文件。 Delete old database tables.删除旧的数据库表。 Import the file you saved with changes.导入您保存的带有更改的文件。 Be aware, it might break your site, so be sure to take a backup of your database before attempting it.请注意,它可能会破坏您的站点,因此请务必在尝试之前备份您的数据库。 If things don't work out, revert the changes and take the help of a developer to fix it for you.如果事情没有解决,请恢复更改并在开发人员的帮助下为您修复它。

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

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