安裝 WordPress 后遇到的一個問題,無法在線更新和安裝插件/主題,頁面報錯信息如下。
發生了預料之外的錯誤。WordPress.org或是此服務器的配置可能出了一些問題。如果您持續遇到困難,請試試支持論壇。 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.
在嘗試網上已有方法均無效。于是試試關閉 SELinux(國外主機測評系統環境為 CentOS 8),發現果然是這里的問題。
解決方法很簡單,用下面命令設置允許 HTTPD 腳本和模塊連接網絡即可。
sudo setsebool -P httpd_can_network_connect 1





















