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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Bobby 3 days, 9 hours ago.

Assisted by: Bobby.

Author Posts
April 28, 2026 at 1:51 pm #18000068

azimd

we can this errors, in our error logs, what is this issues how to resolve this

File /srv/htdocs/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringGettext/Command/CreatePhpFileCommand.php Line 26 Message [Repeated 29 more times] PHP Warning: Zend OPcache API is restricted by "restrict_api" configuration directive in /srv/htdocs/wp-content/plugins/wpml-string-translation/StringTranslation/Infrastructure/StringGettext/Command/CreatePhpFileCommand.php on line 26

April 28, 2026 at 6:28 pm #18000845

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

it looks like Zend OPcache is not allowed to be used on the current hosting environment.

WPML String Translation is trying to interact with OPcache (to create or cache a PHP file), but your PHP configuration has this directive enabled:

opcache.restrict_api

When this is set, only scripts in a specific directory are allowed to call OPcache functions. Your plugin file:

/wp-content/plugins/wpml-string-translation/.../CreatePhpFileCommand.php

is outside that allowed path, so PHP throws the warning.

Also, I noticed that the WP Memory Limit is at 40M, if possible, please increase it to 256M or higher.

-------------

Are you currently hosting the site on wordpress.com by any chance?

This is important, because wordpress.com is strict and most likely won't allow you to edit the php.ini

--------------

If you are not you will most likely be able to edit your php.ini

1. edit your php.ini and either remove or comment out:

opcache.restrict_api=

Or set it to empty:

opcache.restrict_api=""

Then restart PHP / your web server.

If you are on wordpress.com or another hosting environment where editing php.ini is not possible, then you can supress the warnings by deactivating debug, debug display and debug log.

add the following to your wp-config.php

define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
@ini_set('display_errors', 0);

NOTE: Always have a working backup before making any changes to your database or code.

April 29, 2026 at 8:56 am #18002021

azimd

Hi,

Yes, our site is hosted on WordPress. If we disable debug mode, will this issue be resolved? This is not a permanent fix, right? We consulted the WordPress team, and they advised us to check with you. I’ve shared a screenshot of their response. Could you please guide us on how to resolve this issue?

WhatsApp Image 2026-04-29 at 10.47.03 AM.jpeg
April 29, 2026 at 7:45 pm #18004008

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for sharing the feedback from the WP team.

I have escalated this issue to our second tier and will update you as soon as I have feedback.

In the meantime you can use the recommendation of turning off debug display and logging which will prevent it from showing in the front end or filling up your log as a temporary workaround.

The warning will not affect the way WPML or your site work as it's not a FATAL error.