This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported a performance issue with their multilingual webshop when logged in as an admin. The webshop, which has over 50,000 products and 15,000 categories, was experiencing a significant number of SQL queries on every page load due to the function
maybe_populate_cache
in
class-wpml-element-translation.php
. This issue was not present when not logged in as admin. Solution: We recommended the client to modify the Sharespine WooCommerce Connector plugin. Specifically, to edit the
Additionally, we suggested that the Sharespine plugin developers join our Go-Global Program by filling out the form provided, to ensure better compatibility and support for multilingual sites.
Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please do not hesitate to open a new support ticket with us.
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.
Swedish is the "original" language, and then we translate to 3 other languages. It's a webshop with over 50.000 products and over 15.000 categories.
When I surf on the Swedish (original) webshop the performance is "ok", not good but one can live with that. But when I go to the other languages, and is logged in as admin there is a problem.
One EVERY page load the function maybe_populate_cache in class-wpml-element-translation.php does a sql query on EVERY product category.
So, over 15.000 queries every page load....
This does not happen when I am not logged in as admin.
But, we need to be able to work with the web shop logged in as well....
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Hi,
I see that Laura suggested a test in a minimal setup.
If the issue is visible even then, can you install this plugin https://wordpress.org/plugins/query-monitor/ - and measure performance with and without WPML and send us screenshots/results?
Hi Thanks Laura and Bruno.
Yes, I am always using query monitor in my projects....
I have now found the problem, it was a plugin called Unifaun (nShift) that was the problem. I managed to rewrite at bit of their code and it dit it.
I have another performance problem now.
It's when I am saving a product... It takes so much time that it times out and the product is not saved. I tried to remove all 15000 categories and then it works fine to save a product. And also without WPML saving a product works fine....
So I guess that WPML for some reason loads all product categories (and maybe on all languages, that is 15000 * 4 in our case) when saving a product. Is this a way to disable this strange behavior?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Hi,
I assume that this saving is slow when saving a product translation, or does it happen on original also, so when trying to save it but with WPML active?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Hi,
Can I ask you the following? In order to debug this issue, I will install Duplicator plugin, will create packages and will try this on my localhost and escalate further to 2nd tier.
I will exclude all the media files, etc, to keep the package minimal.
Hi Bruno, sorry for a slow answer.
To make sure about the errors I cleaned up the database and worked on that a bit.
I wanted to make sure that this was ok.
And then I did some testing on my own.
Now I have found the issue with adding a product.
It is a conflicting plugin, it's WooCommerce Product Add-ons
As soon that this plugin is activated memory get full and craches the site.
We have loads of memory 756 MB PHP memory, 20480M wordpress memory, so it have to be this plugins that is the problem.
When saving an existing product, this problems does not occur.
I have attached an image on the debug.log when adding a product and having the plugin active.
We really need that plugin, we're working a lot with it... Is there maybe a work around here?
Hi, now I have created a backup.
To make it possible because the site is big I had to download the files and the make three zips of of them.
I have one zip for database, one for source code and one for uploads.
How do I send URL:s for you to download?
Or maybe I can give you FTP ?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Hi,
This is why I suggested I create a Duplicator package - let me know if this would still be an option for you. We never need e.g. media files, Duplicator allows exclusion for almost everything that is not need and much easier deployments for us.