[Resolved] Woocommerce WPML with Divi performance issues
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported a significant performance decrease on their website's backend after using WPML with the Divi theme, especially when adding new products. The database size had grown to 3.5GB for 4,000 products, resulting in over 10 seconds of wait time for backend operations. Solution: 1. We suggested testing with minimal settings, which includes only WPML plugins active with a default theme, to rule out compatibility issues. We also recommended testing with only WPML active with the Divi theme. 2. On the client's site, we performed the following steps: - Ran the synchronization of product category hierarchies as prompted by the admin dashboard banner. - Checked WooCommerce Multilingual & Multi-Currency status for configuration issues and adjusted the WPML settings for
product_variation
, which cannot be set to "fallback". - Advised the client to update all plugins, including WooCommerce, WCML, WPML String Translation, and the Divi Theme. - Noted a long load time when opening the 'Add new' product page and a related notification from the Query Monitor plugin concerning the Autoptimize plugin. - Discovered that deactivating Autoptimize reduced the product edit screen load time to 3 seconds, and upon reactivation, the previous load time issue did not recur, indicating the problem was resolved and not related to WPML.
If you're experiencing similar issues, we recommend following the steps above. However, keep in mind that the solution might be outdated or not applicable to your case. If the problem persists, please open a new support ticket. We also highly recommend checking related 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.
Hello,
Since I started using WPML several months ago, my website performance has gone down substantially. This is most likely due to an unlucky combination with Divi, which saves a lot of metadata then duplicated by WPML. My database is now 3.5GB for 4k products, which is insane. I need to wait 10+ seconds to add a new product. The frontend uses caching, so the slow-down is not that noticable, but the back end is awful. I am a developer, I can provide all the help you need, but I don't have the time to dig deep into the inner workings of WP and all the plugins. I am willing to hire someone to help me diagnose the issues.
Best Regards,
Jaroslaw Watroba
Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.
Performance issues can be tricky to troubleshoot. The first thing we would like to test is minimal settings, meaning only WPML plugins active with a default theme, so we can rule out compatibility issues. Then, we would test with only WPML active with the Divi theme as well. Do you have a staging site where we would be able to test these scenarios? If not, let us know and we can set up a test site to migrate your site to so that we can run these tests.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
I would like to offer to have a closer look at the problem and request temporary access (wp-admin / FTP is not mandatory) to the website to investigate this issue further.
You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.
IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.
I will have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.
The private response form looks like this: hidden link
Next time you reply, click "I still need assistance."
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
Here the steps that I took on our site:
1) There was a banner appearing on top of the admin dashboard asking for the synchronization of product category hierarchies. I ran this task.
2) I checked WooCommerce > WooCommerce Multilingual & Multi-Currency > Status for configuration issue. Here the WPML settings for product_variation were altered and I had to adjust this setting inside WPML. The post-type product_variation can not be set to "fallback".
3) Many of your plugins, including WooCommerce, WCML, and WPML String Translation are not updated. Please update all plugins, then test again.
4) The Divi Theme is not updated.
5) I can confirm that there is a very long load time of more than 30 seconds when trying to open Products > Add new. Also, I see a "Doing it wrong" notification inside Query Monitor that relates to the Autoptimize plugin and some slow queries related to the site's cache.
Once I deactivate Autoptimize the product edit screen loads in 3 seconds. Once I reactivate the plugin again I can no longer confirm any load time of 30 seconds or more and the issue appears to be solved.
I disabled all caching plugins and it helped the admin panel immensely. It also deobfuscated some slow queries. For instance, on frontend product pages, loading every attachment meta, like an image takes 0.2s each. 10 images adds 2s to load time. Also, there is a script that always runs in admin as part of wp_enqueue_media that takes 0.2s as well. Would you take a look at those queries? Maybe those are common problems on big WP dbs.
And the largest query I've found, with over 1 second load time is right on the homepage. I am going to try to modify some of the selects and see if this is an indexing issue somewhere. If it is, I'll make a copy of the site and maybe add some DB indices, for instance on istock_status that I added sorting by manually to show in_stock products before out of stock products. However, please help me if some of those queries I sent you are known problems.
I dug in and fixed several issues:
1. Added custom code to cache the wp_enqueue_media query and removed this call from 2 plugins that were clearly abusing it (eg just to show their logo in the admin panel). Small fix to admin performance.
2. I've installed High performance WP DB plugin, converted my indices, this helped with the product list queries by an order of magnitude.
2. The real issue though, was that EVERY attachment metadata took 200ms to load. 15 images on a page = +3s load time. This one required me to add a custom BTREE index to the db on wp_posts table on 1. post_type 2. guid columns. I was shocked it actually worked! Load time of attachment meta has been reduced to 0.