wordpress修复插件_如何修复WordPress中的安全连接错误

本文详细介绍了WordPress中安全连接错误的常见原因及解决方案,包括如何处理托管和服务器问题,以及在本地环境中修复此错误的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

wordpress修复插件

Are you seeing ‘Unable to establish secure connection error’ in WordPress? It is a common WordPress error and usually occurs when you are trying to install or update a WordPress plugin or theme from official WordPress.org directory. In this article, we will show you why this error occurs and how to easily fix secure connection error in WordPress.

您是否在WordPress中看到“无法建立安全连接错误”? 这是一个常见的WordPress错误 ,通常在您尝试从官方WordPress.org目录安装或更新WordPress插件或主题时发生。 在本文中,我们将向您展示为什么会发生此错误,以及如何轻松修复WordPress中的安全连接错误。

Fixing secure connection error in WordPress
是什么原因导致无法在WordPress中建立安全连接错误? (What Causes Unable to Establish Secure Connection Error in WordPress?)

WordPress comes with a built-in system to manage updates. This system regularly checks for updates and show notifications for you to install plugin / theme updates.

WordPress带有内置系统来管理更新 。 该系统会定期检查更新,并显示通知您安装插件/主题更新。

However, it needs to connect to the WordPress.org website in order to check for updates or install them. Due to some misconfiguration on your WordPress hosting server, your website may fail to connect with WordPress.org website.

但是,它需要连接到WordPress.org网站才能检查更新或安装更新。 由于WordPress托管服务器上的某些配置不正确,您的网站可能无法与WordPress.org网站连接。

This will result in a secure connection error, and you will see an error message like this:

这将导致安全连接错误,并且您将看到以下错误消息:

An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home/username/public_html/wp-admin/includes/update.php on line 122

一个意料之外的问题发生了。 WordPress.org或此服务器的配置可能有问题。 如果您仍然遇到问题,请尝试支持论坛。 (WordPress无法建立与WordPress.org的安全连接。请与您的服务器管理员联系。)位于/home/username/public_html/wp-admin/includes/update.php的第122行

Secure connection error in WordPress

That being said, let’s see how to easily fix secure connection error in WordPress.

话虽如此,让我们看看如何轻松修复WordPress中的安全连接错误。

修复WordPress中的安全连接错误 (Fixing Secure Connection Error in WordPress)

There are multiple ways to fix the unexpected secure connection error in WordPress. You can try one of the following solutions based on your situation.

有多种方法可以解决WordPress中意外的安全连接错误。 您可以根据自己的情况尝试以下解决方案之一。

主机和服务器相关问题 (Hosting and Server Related Issues)

If your shared hosting server is under DDoS attack, then it is likely that the connection to WordPress.org will timeout causing the secure connection error.

如果您的共享托管服务器受到DDoS攻击 ,则与WordPress.org的连接可能会超时,从而导致安全连接错误。

In that case, you can wait for a few minutes and try again. If the error persists, then you need to reach out to your web hosting company’s support team.

在这种情况下,您可以等待几分钟,然后重试。 如果错误仍然存​​在,则需要联系您的网络托管公司的支持团队。

Cloud or VPS Server Connectivity Issue

云或VPS服务器连接问题

If you are on a cloud or VPS hosting, then it is possible that your server is unable to connect to WordPress.org due to some DNS issues.

如果您在云或VPS托管上 ,则由于某些DNS问题,您的服务器可能无法连接到WordPress.org。

In that case, you can point your server directly to WordPress.org servers. You will need to connect to your server using SSH.

在这种情况下,您可以将服务器直接指向WordPress.org服务器。 您将需要使用SSH连接到服务器。

SSH is short for secure shell which is an encrypted protocol that allows you to connect to your server using command line tools.

SSH是安全外壳程序的缩写,它是一种加密协议,可让您使用命令行工具连接到服务器。

Windows users can use a tool called PuTTy whereas Mac / Linux users can use the terminal app.

Windows用户可以使用称为PuTTy的工具,而Mac / Linux用户可以使用终端应用程序。

You will need login credentials for the account with shell access to your hosting account. You can get this information from your hosting account’s cPanel dashboard or ask your web hosting server provider.

您需要该帐户的登录凭据,并且可以通过Shell访问您的托管帐户。 您可以从托管帐户的cPanel信息中心获取此信息,也可以咨询您的网络托管服务器提供商。

In the terminal, you can connect to your server like this:

在终端中,您可以像这样连接到服务器:

ssh username@example.com

Don’t forget to replace username with your own username and example.com with your own domain name.

不要忘记将用户名替换为您自己的用户名,并将example.com替换为您自己的域名。

Once connected, you need to run the following command:

连接后,您需要运行以下命令:

sudo nano /etc/hosts

This will open a file, and you will need to add the following code at the bottom of the file:

这将打开一个文件,您将需要在文件底部添加以下代码:

66.155.40.202 api.wordpress.org

You can now save your changes and exit the the editor. Visit your website to see if this resolved the error.

现在,您可以保存更改并退出编辑器。 访问您的网站以查看是否可以解决该错误。

在Localhost上修复WordPress安全连接错误 (Fixing WordPress Secure Connection Error on Localhost)

If you are running WordPress on your own computer (localhost), then you may not have cURL extension enabled for PHP. This extension is required to access WordPress.org for updates.

如果您在自己的计算机 (本地主机) 运行WordPress ,则可能未为PHP启用cURL扩展名。 此扩展名是访问WordPress.org进行更新所必需的。

You will need to edit the php.ini file on your computer. This file is usually located in the PHP folder of your Mamp, Xampp, or WAMP folder.

您将需要在计算机上编辑php.ini文件。 该文件通常位于Mamp,Xampp或WAMP文件夹PHP文件夹中。

If you are on a Windows computer, then look for the following line:

如果您使用的是Windows计算机,请查找以下行:

;extension=php_curl.dll

;extension=php_curl.dll

Mac and Linux users would have to look for this line:

Mac和Linux用户必须寻找以下行:

;extension=curl.so

;extension=curl.so

Now you need to remove the semicolon before the text to enable the extension. Don’t forget to save your php.ini file.

现在,您需要删除文本前的分号以启用扩展。 不要忘记保存您的php.ini文件。

Lastly, don’t forget to restart the Apache server for changes to take affect.

最后,不要忘记重启Apache服务器以使更改生效。

Check Open Ports in Firewall

检查防火墙中的开放端口

If cURL extension is properly installed on your local server, then the next step is to check your internet connection firewall.

如果本地服务器上正确安装了cURL扩展名,则下一步是检查Internet连接防火墙。

Your computer’s firewall may be blocking outgoing connections from local server to WordPress.org. If you are on Windows, then press the start button and search for Windows Firewall. Mac users can find firewall settings in System Preferences » Security & Privacy

您计算机的防火墙可能正在阻止从本地服务器到WordPress.org的传出连接。 如果您使用的是Windows,请按“开始”按钮并搜索Windows防火墙。 Mac用户可以在系统偏好设置»安全和隐私中找到防火墙设置。

You need to add Apache to your firewall’s allowed programs and allow both incoming and outgoing connections.

您需要将Apache添加到防火墙的允许程序中,并允许传入和传出连接。

Firewall Apache

You will need to restart Apache for changes to take effect.

您将需要重新启动Apache才能使更改生效。

We hope this article helped you solve the WordPress secure connection error. You may also want to see our ultimate step by step WordPress security guide for beginners.

我们希望本文能帮助您解决WordPress安全连接错误。 您可能还想看看我们针对初学者的终极逐步WordPress安全指南

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-fix-secure-connection-error-in-wordpress/

wordpress修复插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值