Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-08:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Bobby 5 months, 2 weeks ago.

Assisted by: Bobby.

Author Posts
May 8, 2024 at 9:19 pm #15607881

olivierG-20

My wesbite is too slow.
It seems that WPML is running to much queries

Capture d’écran 2024-05-08 171906.png
May 8, 2024 at 11:37 pm #15607999

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

Thank you for sharing the screenshot!

1. Please go to Plugins->Add new->Commercial tab and check for updates

2. Update WPML to its latest version (4.6.10) along with any add-on plugins

Check for the duplicate queries again, do you still get the same issue?

If the issue continues, review the following:

- Go to WPML->Settings and review if any post types and taxonomies are using the following mode "display as translated"

If yes, please consider disabling it

- Try disabling the setting to "Adjust IDs for multilingual functionality" at WPML > Languages > Make themes work multilingual, unless you are using a theme that is not officially compatible with WPML OR they are asking explicitly for this setting to be enabled

- Turn off “Track where strings appear on the site” in String Translation.

- Go to WPML->Support->Troubleshooting and run the following actions

Cleanup and optimize string tables
Clear invalid strings
Remove ghost entries from WPML tables

Let me know your results, please.

May 9, 2024 at 6:16 pm #15612056

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

If the above do not help, please also try the suggestion in the following documentation (do this only after updating WPML to 4.6.10 please)

https://wpml.org/errata/wpml-causing-backend-slowness-and-duplicated-queries/

May 9, 2024 at 10:38 pm #15612355

olivierG-20

Thank you for your help; I really appreciate it. I've followed all your suggestions, but unfortunately, it's still not working.

After further investigation, it seems that the issue is also related to the YITH Ajax Product Filter (hidden link).

The YITH Ajax Product Filter appears to trigger the function call WPML_Term_Query_Filter->get_terms() multiple times when loading the shop page. This function executes the query below.

I hope this information will help you address my issue.

=========================================================

Query executed many times

SELECT taxonomy, term_id
FROM wp_term_taxonomy
WHERE term_id IN (43,44,45,141,142,179,180,181,182,183,184,185,186,212,213,248,249,250,271,272,275,276,277,281,282,283,291,292,293,294,301,302,305,306,307,308,309,311,312,340,341,342,343,360,361,362,363,364,365,366,367,368,369,403,404,412,413,414,415,416,417,418,419,423,428,429,430,432,433,434,435,436,437,449,453,454,455,456,471,472,483,484,485,487,488,491,492,493,494,495,506,507,509,510,511,521,523,524,525,528,529,530,531,532,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,553,554,555,556,557,559,560,561,562,563,564,565,566,567,570,571,572,573,574,575,577,581,582,583,584,585,586,587,588,590,591,592,593,595,596,597,598,599,600,601,602,607,608,609,610,611,612,613,614,615,616,617,618,625,626,627,628,647,648,649,650,651,662,663,664,677,678,679,708,745,746,747,753,756,757,758,762,764,765,766,782,783,806,811,812,813,814,815,816,817,818,823,851,852,855,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,884,885,886,887,888,889,890,891,892,893,894,896,901,902,936,937,962,963,1042,1053,1061,1066,1067,1092,1093,1094,1388,1402,1403,1410,1413,1414,1415,1416,1425,1426,1430,1431,1432,1438,1439,1446,1447,1459,1460,1461,1462,1496,1497,1507,1508,1509,1510,1511,1520,1521,1522,1523,1524,1530,1531,1532,1533,1536,1537,1605,1606,1616,1626,1627,1628,1629,1630,1631,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1700,1701,1702,1703,1704,1716,1717,1733,1734,1756,1757,1758,1759,1760,1762,1780,1781,1784,1785,2129,2130,2137,2138,2212,2833)

=========================================================

Function call stack trace

WPML_Term_Query_Filter->get_terms()
wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-term-query-filter.php:203
WPML_Term_Query_Filter->adjust_taxonomies_terms_ids()
wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-term-query-filter.php:132
WPML_Term_Query_Filter->get_terms_args_filter()
wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-term-query-filter.php:86
SitePress->get_terms_args_filter()
wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:2641
apply_filters('get_terms_args')
wp-includes/plugin.php:205
WP_Term_Query->get_terms()
wp-includes/class-wp-term-query.php:411
WP_Term_Query->query()
wp-includes/class-wp-term-query.php:311
get_terms()
wp-includes/taxonomy.php:1350
YITH_WCAN_Filter_Tax->get_formatted_terms()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/filters/class-yith-wcan-filter-tax.php:488
YITH_WCAN_Filter_Tax->has_relevant_terms()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/filters/class-yith-wcan-filter-tax.php:440
YITH_WCAN_Filter_Tax->is_relevant()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/filters/class-yith-wcan-filter-tax.php:66
YITH_WCAN_Filter->render()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/class-yith-wcan-filter.php:1510
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-core-functions.php:345
yith_wcan_get_template()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/functions-yith-wcan.php:972
YITH_WCAN_Shortcode_Filters::render()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/shortcodes/class-yith-wcan-shortcode-filters.php:48
do_shortcode_tag()
wp-includes/shortcodes.php:433
preg_replace_callback()
wp-includes/shortcodes.php:433
do_shortcode()
wp-includes/shortcodes.php:273
YITH_WCAN_Filters_Widget->widget()
wp-content/plugins/yith-woocommerce-ajax-product-filter-premium/includes/widgets/class-yith-wcan-filters-widget.php:123
WP_Widget->display_callback()
wp-includes/class-wp-widget.php:394
dynamic_sidebar('sl_wocommerce_sidebar')
wp-includes/widgets.php:837
load_template('wp-content/themes/salmon-nature/sidebar.php')
wp-includes/template.php:810
locate_template()
wp-includes/template.php:745
get_sidebar('shop')
wp-includes/general-template.php:136
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-core-functions.php:345
woocommerce_get_sidebar()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1051
do_action('woocommerce_sidebar')
wp-includes/plugin.php:517
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-core-functions.php:345

Capture d’écran 2024-05-09 175552.png
Capture d’écran 2024-05-09 175746.png
May 10, 2024 at 6:23 pm #15616123

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for sharing this information!

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

May 13, 2024 at 10:26 pm #15622647

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you for the access details!

I can reproduce the issue on the shop page.

Do I have your permission to activate/deactivate 3rd party plugins on the staging site? If you are not comfortable with me doing this, I can create a copy of the staging site onto our cloudways servers to further test.

May 14, 2024 at 11:28 am #15624934

olivierG-20

Hi Bobby,

You can.

Thanks,
Bruno

May 16, 2024 at 2:42 am #15632608

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Thank you, I was able to do a few tests.

The base loading time was around 23s for the shop page.

Without WPML the loading time only dropped around 21, 15, and 12 was the fastest I was able to get it down to with more plugins deactivated.

When testing with just the very basic plugins ACF pro, WPML and it's add-on plugins and WooCommerce I got the loading time down to between 1.12s - 4.00s

Enabling plugins in batches slowly brought up the loading time to around 8s-9s and stayed pretty consistent there until I enabled the following plugin:

Order Export & Order Import for WooCommerce

this plugin took loading time from 8s to 15s

These plugins overall I would recommend only activating these when you intend to use them and when not using them it's best to keep them deactivated
(even when WPML is not present)

Import and export users and customers
Order Export & Order Import for WooCommerce
WordPress Importer
WP File Manager
WP phpMyAdmin
WPML Export and Import

Query Monitor --> It's recommended when using WPML to only have Query Monitor enabled to debug but have it deactivated on the production site as it can affect performance.

Please review the site now, notice which plugins are deactivated (see recently activated) and test the shop, you will notice with everything it loads to around 9-10s.

deactivating WPML drops that to 8.48-9s loading time which we could probably lower by looking at the duplicate queries once we can confirm that the webtoffee plugin was the main culprit for the site loading in the 20s.

Let me know your results, please.

May 27, 2024 at 3:48 pm #15674999

olivierG-20

Hello,

I have deleted Order Export & Order Import for WooCommerce plugin on staging and the website is still slow.
I'm thinking that it's related to a conflict between yith-wcan-filters-widget and wpml as you can see in the stacktrace

Merci,
Bruno

May 28, 2024 at 11:19 pm #15681243

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi Bruno,

at the moment I am getting similar results with WPML activated and WPML deactivated.

Do you notice a significant change in performance when not using the Yith plugin?

What is the loading time you are seeing at the moment from your side with WML activated vs deactivated?

at the moment I get values ranging from 9s to 11s with or without our plugin.

The topic ‘[Closed] Website is too slow’ is closed to new replies.