Weird issue with WordPress plugin search and installation


I encountered the following error when trying to search plugins on a dev WordPress instance on GCE (Google Cloud Engine).

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.

The dev instance is not Internet accessible intentionally. I use SSH tunnel to forward port 8080 to my local machine, so that I can access it during development, e.g.

Google search and other LLM were not helpful, so I did a bit of debugging. I first learned that api.wordpress.org is used to search and download plugins, so I searched the WordPress code base and found that wp-admin/includes/plugin-install.php is where the API call is instantiated. I modified the code to force non-https request in plugins_api, and then ran a tcpdump to see what happens when I search a plugin

This quickly showed that we got a response 434, which is not standard response code. The request looked very simple, and the only interesting part seemed to be User-Agent:
 WordPress/6.9; http://localhost:8080/
. This was reproducible by curl:

But when I removed http://localhost:8080/ from the User-Agent header, it properly worked. Note that this was not reproducible on my local computer, nor with other port numbers than 8080. Best guess is that wordpress.org has some firewall that targets GCE VM address space with this specific User-Agent value.

Knowing the cause, the fix was to just use a different port for the dev instance and change WP_HOME accordingly.

I think wordpress’s error reporting could need some improvement because the error on the UI was too general. Turning on logging also did not provide enough insights. Bottom line is, the problem can be anything ranging from connectivity issue, to internal wordpress.org issues. Writing this down just to document this fun little debugging session.

Leave a Reply

Your email address will not be published. Required fields are marked *

CodePhoto.WTF © 2026