Simply add this flag to your docker run command. The flag is used like this --add-host yourdomain.com:127.0.0.1. 127.0.0.1 being the host that you want to forward yourdomain.com to, in this case.
Below is an example of a docker run command for WordPress that contains the --add-host flag.
[php]
docker run -d
–name wordpress
-p 8080:80
–add-host yourdomain.com:127.0.0.1
wordpress
[/php]
Success
Now that you have changed your /etc/hosts file, you can go back into the administrative backed of your WordPress installation to check your site health. If you are successful, then you will be presented with the following message “Your site can perform loopback requests“.
It should look similar to the screenshot below.

That it! If all goes well, the wordpress loopback error will disappear and you can get back to managing your site content.
We hope with this post helped you to solve the WordPress loopback error. If you have any questions or comments about this post, feel free to leave a comment below.[]































































































Beri Komentar