Hi everyone!
Iām using Docker on Windows 11 to develop websites locally, as I mentioned in my previous post here.
Here is my docker-compose.yml file:
services:
db:
image: mysql
environment:
MYSQL_DATABASE: wordpress_db
MYSQL_USER: db_user
MYSQL_PASSWORD: db_user_pass
MYSQL_ROOT_PASSWORD: securepassword
volumes:
- db:/var/lib/mysql
wordpress:
image: wordpress:6.9.0-php8.5-apache
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wordpress_db
WORDPRESS_DB_USER: db_user
WORDPRESS_DB_PASSWORD: db_user_pass
volumes:
- wordpress:/var/www/html
volumes:
wordpress:
db:
The site is working just fine, however, Iām getting several errors on the Site Health tab. For example, it shows two critical errors:
1. REST API error:
The REST API encountered an error:
The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.
When testing the REST API, an error was encountered:
REST API Endpoint: http://localhost:8080/wp-json/wp/v2/types/post?context=edit
REST API Response: (http_request_failed) cURL error 7: Failed to connect to localhost port 8080 after 0 ms: Could not connect to server
2. Loopback request error:
Your site could not complete a loopback request
Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.
The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 7: Failed to connect to localhost port 8080 after 0 ms: Could not connect to server (http_request_failed)
Here is a screenshot:
Iām also getting the following error:
3. RSS error:
**RSS Error:** WP HTTP Error: cURL error 28: Connection timed out after 10002 milliseconds
Here is a screenshot:
Iāve tried several methods found online to solve these issues, but nothing has worked so far. The only thing that worked temporarily was changing the site link to host.docker.internal:8080 - ChatGPT suggested doing this, and it worked well for about a month. However, after I updated Docker, the site stopped responding, and I had to change the link back to localhost:8080 manually via sql command to get it working again.
Please help! ![]()


