Why does Firefox redirect my request to port 8080 to port 8000 instead?

I am trying to setup a Wordpress container using docker, solely on my internal LAN. When I launch the docker container with a port mapping of "8080:80" (which is what is recommended on the official Wordpress docker hub page), and go to my Firefox browser and type in the server's IP address and port (i.e. http://192.168.1.190:8080), I expect to see the Wordpress page but instead firefox instantaneously overwrites the address as "http://192.168.1.190:8000" and then gives me an "unable to connect, Firefox can’t establish a connection to the server at 192.168.1.190:8000" message.

If I launch the docker container with a port mapping of "8000:80", everything works fine.

On further testing, it seems if I map the container to anything other than 8000:80, I get the redirect "unable to connect" problem.

Can you guys help me understand what exactly is happening? Does this have something to do with the Wordpress docker container?, or Firefox?, or something else entirely? I don't recall having any problems mapping other containers to whatever port I want and then navigating to them on my home LAN using firefox...


This happens because the WordPress root URL is ocnfigured to be http://192.168.1.190:8000 inside the container. If WordPress receives a request to some other URL, it sends back a redirect to the correct address.

You need to look into WP_SITEURL / WP_HOME defines in wp-config.php, or corresponding settings in WordPress admin interface.