WordPress Can't Connect to the "WordPress Plugin Directory"
If your WordPress installation can’t connect to the "WordPress Plugin Directory" and the "WordPress Events and News" section shows the error:
"RSS Error: WP HTTP Error: cURL error 28: Resolving timed out after XYZ milliseconds",
this indicates that your site tried to resolve a hostname but timed out before receiving a response.
Solution
This issue is not specific to MAMP PRO and affects many installations. Here are some common solutions:
-
Change DNS Servers:
Updating the DNS servers in the "Network" panel of macOS System Preferences to faster ones can help. Try using Google’s public DNS servers (8.8.8.8 and 8.8.4.4) or Cloudflare’s DNS servers (1.1.1.1 and 1.0.0.1). -
Increase PHP Memory:
You can allocate more memory to PHP using MAMP PRO’s Template function. This may improve performance and resolve the issue. -
Install WordPress Native PHP Sessions Plugin:
Installing the external plugin "WordPress Native PHP Sessions" can help speed up PHP execution and may resolve the issue. You can download the plugin here.
These solutions have worked for many users and can help improve connection stability to the WordPress Plugin Directory.