Support » Fixing WordPress » REST API – Error: [] cURL error 28 – Site Health

  • SS:

    I have a server that is hosted locally with VMware. This server runs Ubuntu 18.04. Default ubuntu server iso installation. Cyberpanel – OpenLiteSpeed is installed on this server. The domain is redirected to the server ip addresses with Cloudflare. Ports 80 – 443 – 53 of the server are open to the outside and others are closed. I tried every way but I couldn’t solve this error.
    Wordpress website works normally. I can create a page, publish a Post. But the curl error cannot be solved. No problems are displayed in the error logs. The command $ curl -I from the Ubuntu command line returns an HTTP 200 response. CyberPanel mod security is turned off.

    Web server: LiteSpeed
    PHP version: 7.3.16-1 + bionic (Supports 64bit values)
    PHP SAPI: litespeed
    PHP max input variables: 1000
    PHP time limit: 60
    PHP memory limit: 512M
    Max input time: 120
    Upload max filesize: 20M
    PHP post max size: 80M
    cURL version: 7.58.0 OpenSSL / 1.1.1

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter cihaneken


    Ubuntu terminal:

    root@localhost:~# curl -v
    * Trying xx.xx.xx.xx…
    * TCP_NODELAY set
    * Connected to (xx.xx.xx.xx) port 443 (#0)
    * ALPN, offering h2
    * ALPN, offering http/1.1
    * successfully set certificate verify locations:
    * CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
    * TLSv1.3 (OUT), TLS handshake, Client hello (1):

    Query Monitor plugin:

    cURL error 28: Operation timed out after 10001 milliseconds with 0 out of 0 bytes received

    Health_Check_Site_Status->get_test_rest_availability() wp-content/plugins/health-check/includes/class-health-check-site-status.php:1811
    Health_Check->enqueues() wp-content/plugins/health-check/includes/class-health- check.php:321 do_action(‘admin_enqueue_scripts’) wp-includes/plugin.php:478

    • This reply was modified 2 years, 1 month ago by cihaneken.


    Are you sure about your OpenSSL version ? and that the cert is valid ?
    Did you disable all plugins, then add them back in one by one ?

    Thread Starter cihaneken



    According to the terminal command result I added in the second message, there is no problem in openssl operation and curl processes are also working. But it doesn’t work in wordpress setup. I looked at every point that came to my mind. I don’t see a problem in any of DNS, Mod Security, PHP config.

    I was getting a similar error with mine and it turned out to be an extra session_start(); in my theme’s functions.php file. (Info: )

    Just something else that can cause these cURL messages.

    Thread Starter cihaneken



    The same error persists in the default wordpress theme and debug mode. I think it’s related to openlitespeed, but I haven’t found the source of the problem yet. When I install and try a standard wordpress on my server, there is the same error again. There was no such problem when using Virtualmin panel a few days ago. It turned out when I started using Cyberpanel. I talked to Cyberpanel support, but they have no idea where this problem came from.

    Thread Starter cihaneken


    I found the source of the problem, the problem is htaccess.
    When I add the following standard htaccess rules, REST API starts to give trouble. I think my Openlitespeed server does not accept these rules.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^ index \ .php $ – [L]
    RewriteCond% {REQUEST_FILENAME}! -F
    RewriteCond% {REQUEST_FILENAME}! -D
    RewriteRule. /index.php [L]
    </ IfModule>

    # END WordPress

    Thread Starter cihaneken


    I found the solution and applied it. Now the problem is solved.
    But my view of Openlitespeed has changed a little. Openlitespeed only supports mod_rewrite rules and is only accepted if we add these rules from the server panel. Otherwise, the rules have no validity. Of course, this is a problem specific to the Litespeed free version.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘REST API – Error: [] cURL error 28 – Site Health’ is closed to new replies.