Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing issues with caching and had questions about migrating to a new server with WPML, including updating the domain and preserving WPML settings.

Solution:
1. We suggested that the issue might be related to caching settings or a caching plugin, not WPML directly. If WPML is uninstalled and reinstalled, settings remain since they are saved in the database. A WPML reset would remove all settings.

2. To disable Language Switcher caching, navigate to WPML > Support > Troubleshooting and use the provided option.

3. After migrating to a new domain, remove the old key and generate a new key for the production domain at WPML.org > Account > Sites. Then, register WPML with the new key in the website backend.

4. To migrate the site, we recommended using the Duplicator plugin, which handles URL replacement and preserves WPML settings. Documentation for Duplicator can be found at https://snapcreek.com/duplicator/docs/.

5. Clearing WPML cache is only necessary when caching issues are suspected. There is no cron job for this; it must be done manually in WPML > Support > Troubleshooting.

6. We are not aware of any unique setup required for WPML when configuring the LSCACHE plugin.

7. If the client needs to update the pre-prod environment to remove a notice, they should open a new ticket closer to the migration date.

If this solution does not apply to your situation, or if it seems outdated, we recommend opening a new support ticket. We also 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.

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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 9 months ago.

Assisted by: Mihai Apetrei.

Author Posts
April 8, 2024 at 9:51 am #15493408

aditA

Tell us what you are trying to do?- thisi is the full error i got in my log file " PHP Fatal error: Uncaught Error: Class 'Twig_Template' not found in /home/notaryne/public_html/wp-content/uploads/cache/wpml/twig/2f/2f6fc3c68b0fba15a208cd7923a27eda9ae10cbd85f2386bc6aef6b03bc18075.php:4

Is there any documentation that you are following? - i was trying to use this link " https://wpml.org/forums/topic/critical-error-wpml-twig-template-loader/ " but i cant find the remove all button
also i was looking at - https://wpml.org/forums/topic/wpml-could-not-create-a-cache-directory-in-cache-wpml-twig/
but still there is no option to "WPML > Support > Troubleshooting and click "Remove all messages and notifications"
in addition the action you are asking about " clear the WP Engine cache specially the object cache - do you mean to clear the cache with my WP_OPTIMZE plugin or additional place

also this folder - \uploads\cache\wpml\twig is not empty but the last file is from jan 2024

finally if i will reinstall the plug - do you have option to save all the setup before or to load from a file ?

Is there a similar example that we can see?

What is the link to your site?

April 8, 2024 at 9:53 am #15493412

aditA

can you please make this request private

April 9, 2024 at 9:18 pm #15501743

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

Sorry for the delay and thank you very much for your patience. There has been a pretty full queue in the past days so that is why it took a while to get back to you but things should move fast from now on.

It seems that this issue is coming from a caching folder which is weird and it might not be realated to WPML directly.

So I think this is somehow related to the caching settings or to a caching plugin.

If you uninstall WPML and reinstall it, the settings will still exist as they are saved in the database. Only if you reset WPML, that's when everythign is totally reset:
https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/

I can't make the ticket private, only you can when you create it but I can remove from it any information that you want me to. Also, please note that any URLs that are shared in the tickets are visible only to you and us (the supporters).

I hope that you will find this information helpful. 🙂

Mihai Apetrei

April 13, 2024 at 6:40 pm #15515133

aditA

1. so although the path for the error is //"wp-content/uploads/cache/wpml/ " you think that this is related to Chace and not wpml ?

2. just to make it clear according to the log i sent you did you see anything problematic with the WPML ?

3. in addןtion few question related to new server that i plan to migrate to :

a.the server is with diff URL since we are moving to lite speed machine :

b.at the moment the WPML note that the new domain is a dev at every page ".This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner "
when i will do the transition and will update the prod domain on this machine - do i need to update something in the WPML/key or it will remove the message of the dev env since the new domain will be recognized automatically ?

b . if i want to export the current setup of WPML and save it to a file /or other option to make sure that my test and stage env will have the same setup how i do it ?

4.i will be happ if you can remove the URL

Regards Ami

April 13, 2024 at 7:14 pm #15515138

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there Ami and welcome back!

1. That should be just caching - so I would recommend that you go to WPML > Support > Troubleshooting > and there's an option where you can disable the Language Switcher caching

2. Things look pretty good in the debug information that you attached. There's a new WPML plugin version for the main WPML plugins and some add-ons and you should be able to find those if you go to Plugins > Add new > Commercial > check for updates > and then update them. It is recommended that you first create a full website backup before doing that.

3. After you migrate your site to the new domain, you will just need to go to WPML.org > Account > Sites (https://wpml.org/account/sites) > remove the old key (dev key) that you were using and generate a new key for the domain (production key).

After that, go back to the newly migrated website backend > Plugins > Add new > Commercial and register WPML with the new key (you might need to click "Unregister" first so that you UNregister WPML from the old key).

Sometimes, even after following the steps I mentioned above, you might still see that notice due to existing caching on the site or on the server/CDN (if used).

To clear the server cache, you would need to reach the hosting support.

To clear the site cache, please make sure that you clear/remove it from any existing caching plugin that you might have installed on the site.

4. For migrating your site, my recommendation is to use the following plugin:
- https://wordpress.org/plugins/duplicator/

Documentation can be found here: hidden link

Here is a small tutorial on how to use Duplicator:
hidden link

This plugin should easily take care of the URL-replacing process and should also keep all the WPML settings, as those are saved in the database.

5. All the URLs shared here in our conversation should be visible only to you and me. Am I maybe missing a URL that you maybe shared and that is visible somewhere if you visit this page from an incognito window (or without being logged into your WPML.org account)?

Please let me know.

Mihai

April 18, 2024 at 12:31 pm #15538569

aditA

hi
first thanks for your answer
second some questions :

1. "disable the Language Switcher caching " - if i will do it what is the impact on my website -and what is the main goal of this option?

2. when I clear the cache in my website via the main cache plugin - is it clear also the wpml cache ? if not how often do i need to "clear the cache in WPML " ? Can it be control via a cron job ?

3.do i need to make any unique setup to cache in WPML when i config the LSCACHE plugin ?

4.in order to avoid the issue of "Sometimes, even after following the steps I mentioned above, you might still see that notice due to existing caching " - can you update my pre-prod env that is using a different domain (lawyers-israel.net) a week before the migration to make sure that this note will be removed (since we are moving to new code ver+new server and i migrate only the DB - and i want to make sure that i will not get user error about the note since we generate cert that should be without any additional note !

thanks in advance

Ami

April 19, 2024 at 2:22 pm #15544241

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

1. Language switcher caching tries (like any caching) to speed up your website and not have to load the same information over and over again. Here we are talking about language switcher settings + styling

2. Clearing the WPML caching is recommended only when there's an issue where you suspect it would/could be the caching that's making things not respond to your actions/updates. There's no cron job for this, it can be manually handled from inside WPML > Support > Troubleshooting.

3. I am not aware of anything like that

4. When the time comes, please open a new ticket asking for that specific thing and we will see what can be done at that exact moment and situation.

Mihai