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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Shekhar Bhandari 3 months, 3 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
June 17, 2019 at 9:14 am #4033703

florenceD-4

I am trying to: improve performance, loading time is 15 seconds when I activate WPML

Link to a page where the issue can be seen: hidden link

I expected to see: A faster loading time (without WPML, the page loading time is 2-3 seconds)

Instead, I got: Bad performances

When I try to debug using Debug Objects, I get this error :

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/vhosts/acces-sit.com/preprod.acces-sit.com/wp-includes/functions.php on line 5873

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 69632 bytes) in /var/www/vhosts/acces-sit.com/preprod.acces-sit.com/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-db-chunk.php on line 43

June 17, 2019 at 9:47 am #4034089

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

I understand you are having site performance issues. Since performance issues depend upon the site, the server, plugins used and furthermore. I would need your help to narrow down the issue. Could you please provide feedback on the following questions as much as possible?

#1
We recently released new versions of WPML plugins with improvements and fixes. Being so, may I kindly ask you to update the plugin to the latest version, it would also be nice if you can check the problem with the latest version and share with us the results.

BACKUP NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!). You can use a plugin for this if you like. I often use the Duplicator plugin for this purpose. See: http://wordpress.org/plugins/duplicator/

#2
Can you please review the following articles and see if all the relevant steps are covered?
https://wpml.org/faq/prevent-performance-issues-with-wpml/
https://wpml.org/2012/01/can-your-site-run-faster/

#3
Try disabling and re-enabling all WPML plugins and then going to WPML > Support > Troubleshooting and press the "Recreate ST cache tables" button.

The first visit after the re-activation of the plugins is kinda slow, but after the regeneration of the tables - it will be better.

#4
What type of hosting do you have? Shared, VPS, Dedicated, etc?

#5
Can you confirm that you are still experiencing performance issues with minimal set up (all plugins except WPML disabled and the theme on a WordPress default such as Twenty Nineteen)

Thank you for helping us pinpoint the issue. Feel free to add any further information you may have.

Look forward to your reply.

Thanks

June 18, 2019 at 10:04 am #4042477

florenceD-4

The issue is partially resolved, when I deactivate the template core (Select Stockholm Core), the loading time is coming back to 1 second.

But WPML is still causing PHP Fatal errors (as you can see in the screenshot below)

How can I fix this ?

Thanks.

June 18, 2019 at 10:36 am #4042825

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

What's your current memory limit? Could you please contact your host and ask them to increase it, this should fix the issue.

Let me know if this helps.

Thanks

June 18, 2019 at 11:24 am #4043241

florenceD-4

Hello there,

I just increased the memory limit in my hosting settings and wp-config.php to 512M, sadly it doesn't work.

June 19, 2019 at 11:05 am #4050967

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

June 19, 2019 at 2:01 pm #4052003

florenceD-4

Hello there,
After further investigation, the number of queries of WP_Term_Query->get_terms is really exploding when I switch on both Stockholm Core & WPML :

Stockholm Core: OFF / WPML: ON => 87 queries
Stockholm Core: ON / WPML: OFF => 15 queries
Stockholm Core: ON / WPML: ON => 6611 queries

Is there a way to fix this ?

June 20, 2019 at 5:47 am #4056745

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I replicated your site using duplicator here: hidden link

The login details are same as for your site so I request you to log in to the site and see if the performance you found here is improved.

Also, I request you to provide few links of the pages which are taking most time so I can debug it further.

Look forward to your reply.

Thanks

June 20, 2019 at 8:03 am #4057489

florenceD-4

Hello there,

and thank you for your assistance. The issue remains the same on this server as well, (more than 6000 queries for WP_Term_Query->get_terms when I switch on Stockholm Core and WPML)

Loading time is even worse than the one on my server preprod.acces-sit.com (23 seconds vs 15 seconds).

It is happening on every page of the site, such as :

hidden link
hidden link
hidden link
hidden link

Look forward to your reply.

Thanks

June 20, 2019 at 11:31 am #4059419

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I just disabled all other plugins except "Stockholm Core and WPML" and the performance is very fast, so it looks like there are further plugins that are creating the impact, since you know better about your site performance, could you please enable the plugins one by one the test server and let us know which plugin feels to be creating a lot of impacts?

Also, I would like you to read this blog post where we have mentioned about a new version of Zero-Load String Translation, https://wpml.org/2019/06/wpml-4-2-7-and-a-preview-for-next-major-updates/

Look forward to your reply.

Thanks

June 20, 2019 at 12:26 pm #4059943

florenceD-4

Hello there,

It seems that WooCommerce is causing the issue. Page loading time is around 30 seconds whenever I switch the WooCommerce plugin on.

Look forward to your reply.

Thanks

June 21, 2019 at 12:05 pm #4066907

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am working on this issue and will respond to you soon.

Thanks

June 24, 2019 at 4:34 am #4074415

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I debugged this issue further and noticed that there is only one thing remaining to test, that is to use caching.

To test further, I first disable all WPML plugins and can see a load time of more than 13-14s on the test site with all plugins enabled, the slow query indication was showing for WP_Term_Query->get_terms()

I enabled WPML again and the load time was 25s+, so I enabled Redis object caching + WP Rocket for page caching on the test site and I can see a significant improvement on the performance, so could you please try to use any caching plugins on your site and let me know if that helps:
https://wpml.org/faq/prevent-performance-issues-with-wpml/#caching
https://wpml.org/2017/08/build-fast-multilingual-sites-using-wpml-and-wp-rocket/

Further, I would also like to let you know that on the next release a zero load string translation will be released, so this can also improve your performance much better.

Let me know if this helps.

Kind Regards,
Shekhar