• Resolved ghavami

    (@ghavami)


    Hello and greetings,

    I hope this message finds you well. I’ve created a WordPress site on a Windows Server, and everything seems to be working fine. However, I’m facing two issues with the reset API and loopback.

    I’ve tried all available solutions:

    1. Removed all plugins and themes.
    2. Increased PHP Memory Limit.
    3. Cleared browser cache.
    4. Enabled permalinks.
    5. Disabled the firewall.
    6. Set permalinks to “plain.”
    7. Checked the rewrite module.

    When testing the REST API, I encountered the following error:

    REST API Endpoint: https://site.com/index.php/wp-json/wp/v2/types/post?context=edit
    REST API Response: (http_request_failed) cURL error 28: Connection timed out after 10004 milliseconds.

    And for the loopback request:

    Error: cURL error 28: Connection timed out after 10014 milliseconds (http_request_failed).

    Here are some details about the server:

    • Server Architecture: Windows NT 10.0 AMD64
    • Web Server: Microsoft-IIS/10.0
    • PHP Version: 7.4.4 (Supports 64bit values)
    • PHP Max Input Variables: 3000
    • PHP Time Limit: 120
    • PHP Memory Limit: 256M
    • Max Input Time: 3000
    • Upload Max Filesize: 128M
    • PHP Post Max Size: 128M
    • cURL Version: 7.68.0 OpenSSL/1.1.1d
    • Is SUHOSIN Installed? No
    • Is the Imagick Library Available? Yes
    • Are Pretty Permalinks Supported? Yes

    I would appreciate any guidance on identifying the problem and how to resolve it. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @ghavami,

    It seems like you’ve done a thorough job investigating and trying various solutions. The cURL error 28 you’re encountering usually indicates a timeout issue, and it might not be directly related to WordPress but rather to the server environment.

    Here are a few additional suggestions to troubleshoot and resolve the issues:

    1. You can try increasing the cURL timeout in your WordPress site’s configuration. Edit your wp-config.php file and add or modify the following line: define('WP_HTTP_TIMEOUT', 60);
    *This sets the timeout to 60 seconds. Adjust as needed.

    2. Check the server logs for any relevant error messages or warnings. The Windows Event Viewer and PHP error logs can be helpful in identifying issues. Refer to your hosting provider’s support on how to view your server logs.

    3. Monitor the server’s resource usage (CPU, memory) during API requests. If your server is running out of resources, it might cause timeouts.

    All the best.

    Thread Starter ghavami

    (@ghavami)

    the issue was with the C:\Windows\System32\drivers\etc\hosts file. The WordPress domain along with the IP needed to be defined here.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Issue with REST API and Loopback in WordPress Installed on Windows Server’ is closed to new replies.