Background of the issue:
I am trying to generate .mo files for WPML String Translation on my site hidden link. WPML String Translation uses .mo files instead of database calls, and these files need to be generated for translations to appear on the front-end. The folder permissions are already set to 755.
Symptoms:
There was a problem creating the .mo files. The error message suggests trying again now or later by going to WPML->Theme and plugins localization.
Questions:
Why is there a problem creating the .mo files even though the folder permissions are set to 755?
How can I successfully generate the .mo files for WPML String Translation?
Here is the forum ticket. After taking a backup file and restoring your site on my localhost, I can generate MO files as well. I suspect that there is an issue on your hosting that prevents WPML plugin from generating MO files to the folder /wp-content/languages/wpml/
can you please contact your hosting support and ask them to monitor the issue when you generate the MO files from the modal box?
Our 2nd tier support checked your site and saw that, there is a 403 error for the API URL hidden link in the console so that it could be blocked from the server. Can you please ask the hosting support if they block the Rest API call from WPML?
Also, I created a test server for you in Cloudways (https://wpml.org/hosting-partner/cloudways/). If you are okay with it, we can migrate your content to further debugging without any risk.
To migrate, please follow these simple steps:
- Install this plugin on your site: Cloudways WordPress Migrator (https://wordpress.org/plugins/bv-cloudways-automated-migration/).
- After you activate it, you will be redirected to the migration form.
- Fill it with the information: (find it in the private reply below).
- Agree with the terms of service and click on "Migrate".
More information: hidden link
You will get an email when the migration starts and one when the migration ends. Let me know when the migration is ready, and I will check the issue on the test site immediately.
The copy of your site will be online, but search engines won't index it (the copy), so you don't have to worry about duplicate content.
The information you share with us will be confidential. Once the problem is resolved, the details you shared with us will be deleted from our records. https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
What exactly is used to establish the connection here?
I have neither entries in the error.logs that e.g. mod_security has failed here nor that a server-side error has occurred.
We suggest you migrate the site to another host to isolate some issues related to the hosting side or WPML side because after I restore your site on my local host, it generates .mo files properly.
Can I help you migrate your site data to our test site on Cloudways (just a copy of the site)?
I'm not able to migrate your site to the Cloudways site, something that blocks requests of the Cloudways Migration plugin to migrate data. Please check the attached screenshot.
Then I use the plugin Duplicator to take a full backup of your site and restore it on the Cloudways site. I can generate the .mo files there, without any issues. Here is the screen record hidden link
That makes me think there is a security or protection module that prevents other plugins or external sources from making requests to your site. Can you please ask the hosting support to recheck this?
my hoster write: After checking again, no call is blocked here, the error logs remain empty, there is no reference to Modsecurity or similar, which is managed by us.
I have now deactivated Cloudflare. Maybe something was blocked there. Can you try again now?