This thread is resolved. Here is a description of the problem and solution.
Problem:
You are setting up WPML on your localhost WordPress site and encountered a connection error: 'Unable to get data from service. Detailed error: cURL error 60: SSL certificate problem: self-signed certificate in certificate chain.' You are looking for a way to resolve or bypass the SSL certificate issue on a localhost setup.
Solution:
The issue you're facing with cURL error 60 is a common SSL verification problem in PHP applications like WordPress when making HTTPS requests without being able to verify the SSL certificate of the remote server. Here are some steps you can take:
1. Temporarily disable SSL verification while working locally. Ensure to use a proper certificate when moving to production.
2. For a quick workaround during development, you can disable SSL verification in WordPress by adding the following to your theme’s functions.php file:
add_action('http_api_curl', function($handle) {<br /> curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);<br /> curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);<br />}, 10, 1);
3. Alternatively, force WordPress to ignore SSL issues by adding these lines to your wp-config.php:
define('WP_HTTP_BLOCK_EXTERNAL', false);<br />define('WP_ACCESSIBLE_HOSTS', 'api.wordpress.org, *.wpml.org');
These solutions are intended for development environments and have not been tested extensively as they fall outside the typical scope of WPML support.
Please note that this solution might be outdated or not applicable to your specific case. 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 the issue persists, 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.
This topic contains 1 reply, has 0 voices.
Last updated by 4 months, 2 weeks ago.
Assisted by: Bruno Kos.