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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 0 replies, has 1 voice.

Last updated by Andreas W. 2 days, 19 hours ago.

Assisted by: Andreas W..

Author Posts
December 28, 2024 at 9:47 am #16549800

doronY

Background of the issue:
I am trying to optimize server response times and resolve issues with WPML-related database queries. Query Monitor indicates that WPML executes a significant number of database queries per page load, leading to a Time to First Byte (TTFB) of around 1,000 ms. Even with caching (e.g., Object Cache Pro), these queries appear to be repetitive or inefficient, affecting page load performance. Link to a page where the issue can be seen: hidden link

Symptoms:
High TTFB caused by repetitive WPML queries. Specific examples include repetitive translation queries and string translation lookups. The issue persists despite caching using Object Cache Pro, suggesting inefficiencies in the query design or execution logic.

Questions:
How can I optimize WPML-related database queries to reduce server response times?
Why are WPML queries repeated even on cached page loads?

December 28, 2024 at 11:59 am #16549944

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hi,

I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further.

The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/.

If you are not able to provide such a copy of the website for testing, please let me know on this ticket.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.

Best regards
Andreas

December 28, 2024 at 12:31 pm #16549967

doronY

i sent the login details
you can see the when WPML is enabled im getting 71 queries and 12 duplications
and is i deactivate is i have only 37 queries and the site loads much faster

and in here
hidden link

im getting gthis: Reduce initial server response time Root document took 1,080 ms
only when WPML is enabled

December 28, 2024 at 12:51 pm #16549985

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I had a quick look into this shortly but please take note that a load time impact between 0.5-1.0 seconds is expected with WPML.

The impact of those 10 duplicated queries is 0.0010 Seconds.

The website loads in less than 1 second on Frontend and on the Backend. Further your PageSpeedInsights score is 96 which is a a very good score.

To categorize a performance issue we need significantly longer loading times.

December 28, 2024 at 1:02 pm #16549994

doronY

Thank you for your response. While I understand that a 0.5-1.0 second impact is considered normal with WPML, every second is critical for my website's performance and user experience. Even a single second of delay can significantly impact conversion rates and visitor engagement.

I also noticed that other multilingual plugins, such as Polylang, seem to have shorter load times in similar setups. Could you clarify if this additional second is an inherent limitation of WPML, or if there are specific optimizations I can implement to reduce this delay?

I’m eager to understand whether this performance impact is unavoidable, and if not, I’d appreciate any recommendations to optimize WPML for better load times. Are there particular settings, database optimizations, or configuration tweaks that can help?

Thank you

December 28, 2024 at 2:35 pm #16550168

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

It is that your score of 96 on PageSpeedInsights is currently perfect. There is not any performance issue on the site that should impact your SEO rating at this moment.

Further, could you please follow this performance guide and let me know if you were able to enhance the performance of your site?

https://wpml.org/tutorials/2022/03/boosting-the-performance-of-your-multilingual-wordpress-site/

How to determine and debug a performance issue:
https://wpml.org/faq/how-to-debug-performance-problems/

December 28, 2024 at 2:56 pm #16550182

doronY

While I truly appreciate the excellent PageSpeedInsights score of 96, I do feel a noticeable difference when navigating between pages on my site. When WPML is deactivated, the transitions feel significantly faster from a user's perspective. This is something I sense physically as a visitor, even if the metrics don't explicitly reflect it.

I want to understand if there is a way to further optimize the performance with WPML active. Specifically, is there a method to reduce the number of database queries or to streamline any processes WPML performs in the background during page loads?

I've reviewed the performance guide, and I’d like to confirm if there's anything beyond what's listed there that could help minimize the impact of WPML on the user experience. If there's a specific setting or optimization I might have overlooked, I’d greatly appreciate your guidance.

Thank you again for your support, and I look forward to your insights.

December 28, 2024 at 3:08 pm #16550190

doronY

also i installed the debug bar and you can see many sitepress quieries

December 28, 2024 at 3:21 pm #16550198

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Yes, it is expected that the site is slightly slower when WPML is enabled, as WPML adds many custom tables to the DB in order to manage the languages and this leads to way more queries.

The more languages are active on the site the impact might expand.

All the content will be saved on the default WordPress DB tables and WPML uses its own tables to add language specific information and connections, as also table for the string translations.

Anyhow, the impact usually is only 0.3-0.7 seconds and this is not considered a performance issue, not even by Google.

To be able to escalate a peformance issue internally we would need significantly higher load times that occur in a minimal setup.

The first thing to implement would be a recommended Cache Plugin and a plugin for image optimization. For the load time on backend you might conside a Object Cache plugin, too.

December 28, 2024 at 6:17 pm #16550372

doronY

Thank you for your reply. I understand your point about the additional database queries and the minimal performance impact that WPML is expected to have according to standard metrics. However, my concern is less about the measurable metrics such as Google's PageSpeed or query times and more about the actual user experience when navigating the site.

Specifically, I would like to invite you to visit this page while logged in using the credentials I provided:
hidden link

Once on the page, please click the left arrow button and experience the navigation between pages. Compare the user experience with and without the WPML plugin enabled. I believe you’ll notice the slight delay that I'm referring to, which impacts the smoothness of the transitions.

December 31, 2024 at 3:29 pm #16556095

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The example you are providing loads in a half second and I can sadly not understand what you are asking me to do here. See screenshot.

example.jpg