Background of the issue:
I am trying to resolve errors in the debug.log that are exhausting my CPU resources on the website. The issue can be seen on the page: hidden link.
Symptoms:
I am encountering PHP warnings related to 'file_exists()' and 'realpath()' due to open_basedir restrictions. These errors are causing high CPU usage.
Questions:
How can I resolve the open_basedir restriction errors?
What steps can I take to reduce CPU usage caused by these errors?
I’ve reviewed the link you provided, but I didn’t notice any warnings on the page.
Could you please provide more details about why you believe this issue is related to WPML? If possible, share the exact warning message here in the support forum so we can better understand and assist you.
[08-Jul-2025 14:34:57 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-pl_PL.mo) is not within the allowed path(s): (/home/hcwqbgpzyu/domains/bmhorse.com/public_html:/tmp:/var/tmp:/opt/alt/php81/usr/share/pear/:/opt/alt/php72/usr/share/pear/:/opt/alt/php73/usr/share/pear/:/opt/alt/php53/usr/share/pear/:/opt/alt/php83/usr/share/pear/:/opt/alt/php82/usr/share/pear/:/opt/alt/php71/usr/share/pear/:/opt/alt/php70/usr/share/pear/:/opt/alt/php56/usr/share/pear/:/opt/alt/php74/usr/share/pear/:/opt/alt/php54/usr/share/pear/:/opt/alt/php55/usr/share/pear/:/opt/alt/php80/usr/share/pear/:/opt/alt/php84/usr/share/pear/:/dev/urandom:/var/www/html/waf/:/usr/share/GeoIP/:/usr/local/directadmin/plugins/waf/data/hcwqbgpzyu) in /home/hcwqbgpzyu/domains/bmhorse.com/public_html/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 82
[08-Jul-2025 14:34:57 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-pl_PL.l10n.php) is not within the allowed path(s): (/home/hcwqbgpzyu/domains/bmhorse.com/public_html:/tmp:/var/tmp:/opt/alt/php81/usr/share/pear/:/opt/alt/php72/usr/share/pear/:/opt/alt/php73/usr/share/pear/:/opt/alt/php53/usr/share/pear/:/opt/alt/php83/usr/share/pear/:/opt/alt/php82/usr/share/pear/:/opt/alt/php71/usr/share/pear/:/opt/alt/php70/usr/share/pear/:/opt/alt/php56/usr/share/pear/:/opt/alt/php74/usr/share/pear/:/opt/alt/php54/usr/share/pear/:/opt/alt/php55/usr/share/pear/:/opt/alt/php80/usr/share/pear/:/opt/alt/php84/usr/share/pear/:/dev/urandom:/var/www/html/waf/:/usr/share/GeoIP/:/usr/local/directadmin/plugins/waf/data/hcwqbgpzyu) in /home/hcwqbgpzyu/domains/bmhorse.com/public_html/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 85
[08-Jul-2025 14:34:57 UTC] PHP Warning: realpath(): open_basedir restriction in effect. File(/usr/local/bin) is not within the allowed path(s): (/home/hcwqbgpzyu/domains/bmhorse.com/public_html:/tmp:/var/tmp:/opt/alt/php81/usr/share/pear/:/opt/alt/php72/usr/share/pear/:/opt/alt/php73/usr/share/pear/:/opt/alt/php53/usr/share/pear/:/opt/alt/php83/usr/share/pear/:/opt/alt/php82/usr/share/pear/:/opt/alt/php71/usr/share/pear/:/opt/alt/php70/usr/share/pear/:/opt/alt/php56/usr/share/pear/:/opt/alt/php74/usr/share/pear/:/opt/alt/php54/usr/share/pear/:/opt/alt/php55/usr/share/pear/:/opt/alt/php80/usr/share/pear/:/opt/alt/php84/usr/share/pear/:/dev/urandom:/var/www/html/waf/:/usr/share/GeoIP/:/usr/local/directadmin/plugins/waf/data/hcwqbgpzyu) in /home/hcwqbgpzyu/domains/bmhorse.com/public_html/wp-includes/l10n/class-wp-translation-controller.php on line 106
I have String Translation 3.3.3,
Everything has been cleaned multiple times. I'll disable and re-enable the plugin, wait until tomorrow to see if it worked, and let you know.
Based on the debug information, it appears that the REST API might not be enabled on your site. I also couldn’t access it directly. I noticed that the Disable WP REST API plugin is active in your installation — please review this setting, as it could be blocking essential functionality.
WPML relies on the REST API for several features. For example:
wpml/st/v1 – This endpoint is used to import and generate MO files, and to save String Translation settings. Disabling the REST API or the String Translation plugin may prevent these features from functioning correctly. https://wpml.org/documentation/support/rest-api-dependencies/
The REST API being disabled may be contributing to the issue you’re experiencing.
If the problem persists, please try the following:
1. Temporarily disable all non-WPML plugins.
2. Ensure that the REST API is enabled.
3. Test this again with only WPML plugins active.
Before making any changes, please ensure that you back up your database first.
I uninstalled the Legacy REST API and disabled the REST API. I also deactivated and reactivated the WPML plugins, cleared the cache — but nothing worked :/
I need to request temporary access (wp-admin and FTP) to your site—preferably to a test site where the problem has been replicated if possible—in order to be of better help. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.
Please include the exact steps to reproduce the issue.