Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: 

This topic contains 2 replies, has 0 voices.

Last updated by Shekhar Bhandari 1 month ago.

Assisted by: Shekhar Bhandari.

Author Posts
November 3, 2025 at 9:27 am #17539942

gianfrancoa-3

Background of the issue:
I am trying to fix lots of 'open_basedir restriction in effect' errors in my log.

PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-en_US.mo) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 82

PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-en_US.l10n.php) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 85

PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-includes/l10n/class-wp-translation-controller.php on line 106

Symptoms:
PHP Warning: file_exists(): open_basedir restriction in effect. I still got many 'open_basedir restriction in effect' in my log.

Questions:
How can I fix those "open_basedir restriction in effect" warnings in my log?
Please DO NOT suggest to set "open_basedir" settings in my account to "none" because that would be a security issue.
Thanks!

November 6, 2025 at 7:55 am #17552343

gianfrancoa-3

Hi, I still need assistance for this issue.

As I said, I can't set "open_basedir" settings to "none" because that would be a security issue. So I'd like to have an alternative solution.

It seems your plugin are looking for some files in the wrong directory:

PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-en_US.mo) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 82

PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-en_US.l10n.php) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 85

PHP Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/mywebsite/) in /home/mywebsite/www/wp-includes/l10n/class-wp-translation-controller.php on line 106

So I guess the path for those specific files needs to be fixed, am I right? So can you please tell me how can I fix those paths?

Thanks!

November 6, 2025 at 7:58 am #17552378

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

The topic ‘[Closed] PHP Warning: file_exists(): open_basedir restriction in effect’ is closed to new replies.