[Resolved] When we are enabling WPML on our website its going down
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported that their website was going down every hour due to increased server memory consumption when WPML was enabled. Without WPML, the server memory usage was at 1GB, but with WPML activated, it increased to 3GB, causing MySQL crashes. Solution: We reviewed the site's settings and found that the PHP memory limit was set to 256MB, but the WordPress memory limit was only set to 40MB. We increased the WordPress memory limit to 250MB and enabled the WPML SEO feature. After monitoring the site for several hours, we did not observe any resource exhaustion or significant slowness. We asked the client to test the site and inform us if the issue persists or if there are specific steps that could reproduce the problem.
If you're experiencing similar issues, we recommend checking your WordPress memory limit and adjusting it accordingly. It's also beneficial to enable WPML SEO and monitor your site's performance. If the problem continues, or if this solution seems outdated or not applicable to your case, please visit our known issues page, verify the version of the permanent fix, and ensure you have the latest versions of themes and plugins installed. If necessary, do not hesitate to open a new support ticket in our support forum for further assistance.
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.
Hi
When we are enabling WPML on our website its going down after every 1 hours because its consuming server memory. Without WPML server showing 1GB memory usage and with WPML its showing 3GB and site keep going down because of mySQL crash.
Before this ticket gets assigned to one of my colleagues, I will try to help.
Let me share some more generic advice about tackling performance issues, before turning to some specific steps you might take that relate to WPML itself.
Performance issues tend to become noticeable on larger sites such as e-commerce sites, and these can quickly multiply when you make the same content available in many other languages.
[ ] - So the first step is to make sure that your site is adequately resourced. The minimum requirements for WPML (https://wpml.org/home/minimum-requirements/) are very much a minimum, and larger sites should have more memory and server resources to function well.
[ ] - Use PHP 8 (performance improved a lot compared to PHP 7), but not the most recent versions (at the time of writing, PHP 8.2 versions) because it takes time for themes and plugins, and WordPress itself, to catch up and ensure compatibility.
[ ] - Caching is invaluable. You can use page caching plugins such as Super Cache, W3 Total Cache, or WP-Rocket, and preferably also object caching, for example via Redis and a plugin like https://wordpress.org/plugins/redis-cache/.
[ ] - Do not use any kind of SSL-helping plugins. They produce significant overhead by redirecting every request. To use https properly, just convert all links in the database using a safe search-replace plugin such as Better Search Replace or via WP-CLI.
[ ] - Consider using the plugin Index WP MySQL For Speed (https://wordpress.org/plugins/index-wp-mysql-for-speed/). WordPress table indexes are not optimised, and this plugin updates the table indexes to improve performance.
[ ] - Don't have debugging plugins like Query Monitor active in production, they add overhead. (Likewise make sure Xdebug is not active on your production server.) Review your list of plugins more generally to ensure you are only using plugins that are actually needed. (That includes WPML Media, which is only needed if you need to display different images when showing translated content; it is not needed to translate image texts such as captions.)
[ ] - Naturally, you page weight should be as low as possible, which means optimising assets such as JavaScript and CSS files, as well as compressing images.
More specifically, relating to WPML:
[ ] - Consider disabling "display as translated" (Fallback mode) from post types and taxonomies (in which case content will only be shown on secondary languages where translations exist; the resulting queries are much simpler).
[ ] - Try disabling the setting to "Adjust IDs for multilingual functionality" at WPML > Languages > Make themes work multilingual. Recommended themes should not need this setting.
[ ] - Turn off "Track where strings appear on the site" in String Translation if it is active.
[ ] - From the troubleshooting page (via WPML > Support) at wp-admin/admin.php?page=sitepress-multilingual-cms/menu/troubleshooting.php try the "Cleanup and optimize string tables" and "Clear invalid strings" options. It might also be helpful to "Remove ghost entries from WPML tables".
Doing all of the above should make quite a difference to the performance of your site.
If you have done these steps and still have performance concerns arising from WPML, we may need to access your site to take a closer look to see if we can identify the pain points and their causes. If following the steps above, things still don't work well, please let us know so that we can enable the private fields so that you can share site access.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
Thank you for sharing that information.
I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.
I'll make sure to delete this copy as soon as we get this issue fixed.
I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.