• Hi, need help with an intermittent connection problem when navigating to WP menu Plugins -> Add new plugin. Sometimes (many times, 4 out of 5) it fails to connect to WordPress database, so the list of plugins does not appear, or plugin information does not load.

    This is a fresh install, no plugin interfering, no strange theme, on a high end dedicated server, and like all servers nowadays it is under constant external attacks. So I am trying to created a very restricted and controlled environment, and unfortunately WP documentation does not specify what ports to leave open for a standard WP install. On stackoverflow and other sites all I can find is port 80 and 443, but that is not totally true, because if I restrict all ports except 80 and 443 on the stateless firewall, WP Frontend runs fine, and WP Backend runs fine, except when I want to install a new plugin. Most of the requests to WP servers have connection problems. There are moments when it works, but it mostly fails.

    Unfortunately I don’t know how to debug it and filter the requests on my end in order to find what port it is trying to use because there is no distinction among the rest of the external connections the server is making. I tried to capture and log all the traffic but there is too much noise.

    And by looking at the code I reached the function plugins_api() and at first sight the error messages can be drastically improved, to better guide on the type of error that occurred. But I was not able to find any special distinctive Header being set to be able to differentiate this requests from others. Maybe I am missing something or it can be implemented in the future to allow a better debugging.

    And that’s why I am here, to ask for help and guidance. Maybe someone knows what ports to leave open so that connection to WP servers can be made without issues.

The topic ‘curl | plugins_api() | intermittent connection problem’ is closed to new replies.