Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to access the URL and encounter an error message indicating that your site doesn't meet WPML's minimum requirements because the WordPress REST API must be enabled.
Solution:
We recommend modifying a specific section of the code in your WPML plugin files to resolve the issue. Here are the steps:
1. Navigate to the file

sitepress-multilingual-cms/vendor/wpml/wpml/src/Infrastructure/WordPress/SharedKernel/Server/Application/WordPressRestApiStatus.php

.
2. Locate the following section of code starting from line 70:

    // Add basic authentication if present<br />    if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {<br />      $args['headers']['Authorization'] =<br />        'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] );<br />    }

3. Immediately after this section, add the following lines:

    // Add authentication from cookies<br />    $args['cookies'] = $_COOKIE;

This modification should help enable the WordPress REST API and meet the WPML's minimum requirements. If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins.

If you need further assistance, please open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 2 replies, has 0 voices.

Last updated by Dražen 2 months, 2 weeks ago.

Assisted by: Dražen.

Author Posts
September 15, 2025 at 9:13 am #17401169

szabolcsL-2

Background of the issue:
I am trying to access the URL hidden link and encountered an error message indicating that my site doesn't meet WPML's minimum requirements.

Symptoms:
The error message states: 'Your site doesn't meet WPML's minimum requirements. The WordPress REST API must be enabled for WPML to work correctly.'

Questions:
How can I fix the issue with the WordPress REST API not being enabled?

Everything is updated, but the system still says it's not.

September 15, 2025 at 9:20 am #17401216

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

You were inactive in chat, so I have created a ticket and we can continue here.

1) Can you please share image of the error screen where you get the message, so I can understand better what and where you get it.

2) If you have a staging site where the problem can be reproduced, it would be good to share access to the staging site, so I can check further.

Thanks,
Drazen

September 15, 2025 at 12:25 pm #17402136

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

in meantime I have checked further and seems to be a know issue.

Please try next:

Edit this code sitepress-multilingual-cms/vendor/wpml/wpml/src/Infrastructure/WordPress/SharedKernel/Server/Application/WordPressRestApiStatus.php

Locate this section of code in that file (from line 70):

    // Add basic authentication if present
    if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
      $args['headers']['Authorization'] =
        'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] );
    }

and add these lines immediately afterward:

    // Add authentication from cookies
    $args['cookies'] = $_COOKIE;

Let me know if that helps.

Regards,
Drazen