• Resolved led500

    (@led500)


    When I go to SG optimizer it displays this error and I cannot enable or change anything:

    COULD NOT CONNECT TO THE WORDPRESS REST API
    Either a security plugin, custom function or rules in your .htaccess file is preventing the WordPress REST API from working properly. SG Optimizer is using it to store its options and other functionalities so please make sure it works properly.

Viewing 4 replies - 16 through 19 (of 19 total)
  • Devomo

    (@devfirst)

    Hello there, has anyone made any discoveries on this? I am running into the same problem, so I created a completely new and vanilla WordPress 5.9 installation on an Apache server running PHP 7.4. I still get the same issue:

    COULD NOT CONNECT TO THE WORDPRESS REST API
    Either a security plugin, custom function, or rules in your .htaccess file is preventing the WordPress REST API from working properly. SiteGround Optimizer is using it to store its options and other functionalities so please make sure it works properly.

    My .htaccess is the one generated by WordPress on installation:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Like I said, completely vanilla WordPress. No plugins installed; default theme. In other places (like the block editor) the REST API is working just fine. The server the site runs on has never given me any REST API related problems like this before. I am wondering what is going on? I would be happy to provide any additional info if needed.

    • This reply was modified 3 years ago by Devomo.
    Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @devfirst,

    There is no specific problem with the SIteGround Optimizer plugin that could be causing this issue. Such Rest API errors are usually related to restrictive rules or a conflict caused by another plugin.

    I advise you to open a new thread and provide us with the URL of the website where you are testing this behavior.If there are any specific steps that should be followed to encounter the problem, we would appreciate if you provide them.

    Please also enlist the plugins and the themes that are present under your application. You mentioned that it is vanilla, but testing with such installation on our end, we could not encounter similar issues.

    In case you have set up the new installation in a subdirectory, please make sure that there are no .htaccess files with restrictive rules in the previous directories. It is important that the

    If you are a SiteGround client you are also welcome to open a Help desk request and we will be checking things further on our end.

    Best regards,
    Georgi Ganchev

    Devomo

    (@devfirst)

    @georgiganchev thanks for the swift reply, I’ll create a new thread.

    Plugin Support Georgi Ganchev

    (@georgiganchev)

    @devfirst,

    I see that you edited your post while I was writing my reply.

    The reported issue cannot be replicated on our end. We are testing with a brand new vanilla installation. There are no such problems reported by other users since the last update of the plugin which happened on 4-th of March.

    The issue should be related to some specific setup you are using, for us to test the same we would need to have the means to replicate it.

    What I advise you to do is to check the health status of your WordPress from Tools > Site Health and let us know if any issues are reported. Please verify that you are using the latest SG Optimizer plugin version and provide us with a screenshot of the exact error that you encounter.

    In case you have set up the new installation in a subdirectory, please make sure that there are no .htaccess files with restrictive rules in the previous directories.

    We will review the details that you provide in a new thread.

    Best regards,
    Georgi Ganchev

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘COULD NOT CONNECT TO THE WORDPRESS REST API’ is closed to new replies.