localhost2host.docker.internal
localhost2host.docker.internal
Description
Prevents loopback request errors in WordPress environments using Docker such as wp-env.
Replace requests to localhost with host.docker.internal, and if https, change to http and turn off sslverify.
There are no settings. Just enable this plugin.
Installation
- Upload the
localhost2host-docker-internalfolder to the/wp-content/plugins/directory. - Activate the plugin through the
Pluginsmenu in WordPress
Reviews
Simple and best solution in wordpress/env(wp-env) development
By Fumiki Takahashi (Takahashi_Fumiki) on July 10, 2025
If you have troubles in local development with wp-env, use this plugin.
In your .wp-env.json , add this plugin's download URL(NOTICE: review comment is not allowed to include URL, add https +:// just before the downloads.wordpress.org
{
"plugins": [
".",
"[schema here]downloads.wordpress.org/plugin/localhost2host-docker-internal.latest-stable.zip"
]
}
WordPress' self remote request(e.g. WP-Cron) starts working as expected! Arigato!