If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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.

This thread is resolved. Here is a description of the problem and solution.

Some sites run into performance issues because of other plugins. It can be due to compatibility issues with WPML or other problems in the code of those plugins.

If you are running into performance problems, first follow our FAQ entry about preventing performance issues with WPML. This FAQ includes a number of simple steps to follow.

In case you want to profile your site's performance and get to the bottom of performance problems, follow the guide for debugging performance problems.

Tagged: 

This topic contains 120 replies, has 4 voices.

Last updated by George Botsev 1 year, 12 months ago.

Assigned support staff: George Botsev.

Author Posts
March 28, 2017 at 3:46 pm #1241587

adriO

Hi Otto,

A new issue has surfaced. In my site (developing on my local machine) it is almost impossible to load new pages. The site is soooooooooo extreeeeeeeeeeeeeeeemely sloooooooooooow. It feels like I'm back in the early 90s with connections of 14.400kb and less. It is taking sometimes up to a minute for any response. And over at WPML the statement is: it is only for you, the admin, the site is slow but not for the visitors. Ok, great, but I have to work on my site and this is unbearable.

Not long ago it was slow, but ok, I could work with it. Not anymore.

And sorry to say, it is caused by WPML. Deactivating the plugins the site is much, much faster.

I read up about it on the forums and followed the suggestions made to no avail. I have the latest versions installed and I do not track strings or so. I even tried to reconfigure my localhost to no avail.

And I have to have some work done because it is Christmas before you know it.

Please help me out here.... I'm stuck.

Best wishes,

Adri

March 30, 2017 at 10:03 am #1243177

adriO

Sadly there is no response yet..... it looks like the WPML organization is just as fast (not) as the plugins. However I had some pretty good experiences in the past so I keep my hopes up.

Some additional information, in debug mode it is producing this message:

WordPress databasefout: [Table 'woocommerce.fcsp_icl_string_pages' doesn't exist]
SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, s.value AS orig FROM fcsp_icl_string_pages sp INNER JOIN fcsp_icl_string_urls su ON su.id = sp.url_id INNER JOIN fcsp_icl_strings s ON s.id = sp.string_id LEFT JOIN fcsp_icl_string_translations st ON s.id=st.string_id AND st.language=su.language AND s.language!=su.language WHERE (su.language='en' and su.url='/') or (su.language='en' and su.url IS NULL)

Notice: yith_wcwl_products cookie cannot be set - headers already sent by /Users/adri/Documents/websites/htdocs/wp-includes/wp-db.php on line 1402 in /Users/adri/Documents/websites/htdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 734

Maybe this database error is causing the trouble? It appears to me that it is wrong none the less when a table is missing.

What can I do about it?

Please advice....

Adri

March 30, 2017 at 12:58 pm #1243414

Joanna

Hello Adri,

I'm sorry that you had to wait so long for the answer. Otto is currently on holidays and if you assigned the ticket to him, it could be the reason your ticket was accidentally missed. I'm sorry once again.

The error you have may be the reason of your performance issues, just as you noticed.
The table might be missing if you performed the direct update from and older version, skipping some database schema updates. It could also happen if there was a connection issue during the update.

Please try to do the following:
To fix the issue, please do the following:
1. Make a full backup of your site (files and the database). Please do not skip this step.
2. Log into your FTP.
3. Go to your currently active theme's root folder and find the functions.php file. Open it for edit.
4. Add the following code to the bottom of the functions.php file:

function wpml_fix_missing_icl_tables() {
  
    if( function_exists( 'icl_sitepress_activate' ) )
  
        icl_sitepress_activate();
  
}
  
add_action( 'wp_footer', 'wpml_fix_missing_icl_tables' );

5. Save changes.
6. Visit your site’s homepage (on the frontend) at least once and wait until it fully loads the footer.
7. Remove the code from the functions.php file.

If the issue still occurs (the error or the slowness), I would like to ask you for credentials to your website and FTP. It will help me debug the issue and find the solution. You will find the fields for WordPress and FTP access below the comment area when you log in to leave your next reply.

Additionally, if you have the option to test on the copy of your site, you may want to test with the latest WPML's beta version. You can find it at https://wpml.org/download/wpml-multilingual-cms/?section=changelog.
Since it's a beta version that is not fully tested yet, please do not use it on a live site.

March 31, 2017 at 2:01 pm #1244425

adriO

Hi Joanna, thank you for your reply.
As stated in my original post I'm developing on a local machine, using MAMP. So therefor I'm not able to supply credentials to my site. The only way you can have a peek is when we set up a TeamViewer session (or something similar). Or I have to send you my complete site (google drive).

Because I had to wait for an answer and working on my site was pointless due to the super slow performance I tried to solve it myself. I went back to an older database (backup from the beginning of March) and saw that the tables were present. I did not see very much improvement. When I dropped the tables phpMyAdmin informed me that no tables were in the database but I still saw the names of the "fcsp_icl_string_pages" and the "fcsp_icl_string_urls" tables. Mmmmm, strange, no good. So I dropped the whole database, created a new one with the same name and imported the backup sql file once more.

This went much better, the performance was increased a lot. However, it is still a lot slower with activated WPML plugins. When the plugins are disabled all actions are a lot, and I say it again a lot quicker. From what I can tell with activated plugins it takes up more than twice the time.

I do hope you have any suggestions left for me.

Thanks in advance,

Best wishes,

Adri

March 31, 2017 at 4:03 pm #1244582

Joanna

Hello Adri,

If you have any cache on your server or cache plugins, please clear the cache. If that doesn't help, could you please try the following:
1. Clear WPML cache in WPML->Support->Troubleshooting.
2. Clear cache
3. Go to WPML->Languages and switch the language URL format to another one. Save changes.
4. Go to Settings->Permalinks and re-save your settings.
5. Go back to WPML->Languages and switch the language URL format back to the previous one. Save changes.
6. Go back to Settings->Permalinks and re-save your settings.

If that doesn't help and if it's okay with you, I’d like to replicate your website locally. This will help me debug the issue and find the solution. For this, I'll need a snapshot of your site which you can create using a plugin called "Duplicator". This will allow me to create a copy of your site and your content.

If you already know how Duplicator works (http://wordpress.org/plugins/duplicator/), please send me the installer file and the zipped package you downloaded.

Here's a great tutorial on how to use it: hidden link.

Please send me both files (you probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big). Your next reply will be private, which means that only you and I will be able to see it and have access to it. You can paste the links to the files there. You can also install the Duplicator plugin, create a snapshot and share the credentials to your website. I will then download the files from the admin panel.

If you choose to share the credentials, I'd also be able to check the issue on your website in case I'm unable to replicate it locally.

Once the problem is resolved I will delete the local site.

April 3, 2017 at 2:24 pm #1245897

Joanna

Hello Adri,

Thank you for the files. I'll replicate your website locally, test it and get back to you with my findings. Do not worry, I always describe steps I followed to solve the issue, in case you need to replicate the solution.

April 4, 2017 at 3:38 pm #1247049

Joanna

Hello Adri,

I replicated your website but since it's really slow testing takes longer than I expected. I just wanted to let you know that I am still working on this and I expect to send you feedback within 24 hours.

April 4, 2017 at 5:46 pm #1247143

adriO

Hi Joannam thank you for your reply.
Sorry to hear that it eats away a lot of your time testing this issue.
On the other hands....... it is a little bit satisfying that it is not only in my imagination 🙂

Tak your time to test it and pin down the cause. Over the next two days (at least) I'm extremely busy doing other things so don't feel any pressure (as long as it solved within the next 10 minutes haha).

Best wishes,

Adri

April 5, 2017 at 4:11 pm #1248070

Joanna

Hello Adri,

I noticed that the performance issue happens with WPML plugins only. The site works quicker, of course, but not quick enough. I had to escalate your issue to our 2nd tier so they can take a look at it with a fresh eye.
I'll get back to you as soon as I have any feedback from them.

April 5, 2017 at 4:45 pm #1248091

adriO

Hi Joanna, thank you for your update....

I'm sorry that you were not able to pin down the issue yourself but thank you for escalating this to 2nd tier. However, I'm sorry to say, experiences from the past has learned me that the communication with them is (to put it mildly) very gluey.

I do hope you have better experiences and could some pressure on (if needed).

Ok, let's wait and see where they come up with.

Thanks for now and best wishes.

Adri

April 6, 2017 at 3:37 pm #1249080

Joanna

Hello Adri,

I think I managed to get somewhere. I keep my fingers crossed that it will work on your installation as well.

What did I do?

0. First, I deactivated all plugins and activated the Twenty Seventeen theme to speed up the site.

1. I removed the "wp-admin" and "wp-includes" folders and uploaded them again, using folders from the freshly downloaded WordPress.

2. I changed the "*_icl_cms_nav_cache" table's type to "InnoDB" so it matches the rest of your tables.

3. You were using the development version of WooCommerce (2.7-RC1). It was already released as WooCommerce 3.0. Since WPML is not fully compatible with WooCommerce 3.0 yet, I installed the last stable version from before 3.0, i.e. WooCommerce 2.6.14. You can find it at https://wordpress.org/plugins/woocommerce/advanced/, in the "previous versions" section.

4. Using the WP-Optimize plugin, I did a little cleanup, e.g. deleted all transients.

5. I added the following code to the wp-config.php file:

define( 'SAVEQUERIES', TRUE );

6. Still in wp-config.php, I moved the following lines:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

above the line:

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

because it's forbidden to add anything below these lines.

7. I also removed the following line:

define('WPLANG', 'nl_NL');

Starting from WordPress 4.0, you don't need to define WPLANG.

8. I activated the plugins one by one, leaving WPML plugins to the end. I activated WooCommerce and WooCommerce-related plugins just before the WPML ones.
I didn't activate WPML CMS Nav because I noticed that you don't use it on your website.
You can read more about WPML CMS Nav at https://wpml.org/documentation/getting-started-guide/site-navigation/ and decide if you really need this plugin.

9. I double checked if the "Adjust IDs for multilingual functionality" option is disabled in WPML->Languages->Make themes work multilingual.

10. In WPML->String Translation, I excluded all domains from autoregistering, in "Auto register strings for translation". When you exclude all domains from autoregistering, you'll need to scan your themes and plugins for strings manually in WPML->Theme and plugins localization. Note that when you install a new plugin or theme, you'll need to exclude them from autoregistering.

All these actions made the website work 10 times faster. It's not perfect yet but your website's load is ~3s even without WPML plugins.

Please let me know if that improves your experience on your installation.

April 7, 2017 at 3:17 pm #1250058

adriO

Hi Joanna, thank you for your reply and the huge effort you are putting into this issue. I'm truly grateful for it.

I followed your steps to the letter (after backing up my site and database of course) and guess what? The speed is sadly not improved. Only when I deactivate WPML (and related) plugins the speed improves a lot. It is not super super fast but ok to work with.

I tried it with the WooCommerce 2.6.14 version, the WooCommerce 2.7 RC2 version and the just released 3.0 version. No difference what so ever. Although I think that sometimes it looks a little bit faster at some (random) actions the overall speed has not improved.

So, although there is no real improvement visible I will work further on with this installation and hope you will be able to pin it further down.

Best wishes,

Adri

April 10, 2017 at 3:15 pm #1251341

Joanna

Hello Adri,

We plan to release a new major version this week. It will include some bug fixes as well as improvements in the code. I tested locally on the copy of your site with this new version and I was able to spot that the site was loading quicker than before.
If it's possible for you to wait a couple of days more you will be able to test the new version to see if that improves the performance on your installation.

I'll let you know when the new version is released. In the meantime, please also take care of warnings and notices that come from your other plugins. This may also help with the overall performance of your website.

April 10, 2017 at 3:36 pm #1251370

adriO

Hi Joanna,

Great that a new version is being released. I'm hopeful. I have tried to do some tweaking on my end (my localhost environment) but I was not able to see significant changes in performance. Let's wait and see what is happening with the new release.

And yes I was monitoring other plugins (and such) as well. In debug mode I discovered some glitches related to WooCommerce which I was able to fix (or awaiting a fix from WooCommerce).

There is also one WPML related I saw once. I did not reported it yet because I could not find it anymore. I do remember it was on a product page under the Dutch flag at every product.
It is:

Warning: Missing argument 4 for WPML_TM_Page_Builders_Hooks::link_to_translation_filter(), called in /Users/adri/Documents/websites/htdocs/wp-includes/class-wp-hook.php on line 298 and defined in /Users/adri/Documents/websites/htdocs/wp-content/plugins/wpml-translation-management/classes/page-builders/class-wpml-tm-page-builders-hooks.php on line 90

I don't know where it came from or what it does. Let's hope It is not shown again or is fixed in the upcoming release.

Next to that, and that can give (I think) a lot of performance loss, I noticed a warning when I want to enter the installed plugin page. It is: Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /Users/adri/Documents/websites/htdocs/wp-includes/update.php on line 319

That is the reason why I tried to optimize my local setup. It looks like WordPress is trying to connect to an outside server and have trouble to connect. That can clarify why there is some performance loss. However it is not consistent.

What I also see is that my Chrome takes a long time to connect. The indicator is spinning backwards for a long time. When it connects (and the indicator is spinning forward) the pages are served fast enough. I suspect a DNS issue but have no idea to resolve it.

So, a lot of info but I just thought to let you know.
Looking forward to the new release.

Best wishes, and again, thanks for your help.

Adri

April 11, 2017 at 3:00 pm #1252241

Joanna

Hello Adri,

The error you mentioned is coming from the Media Library Assistant plugin. WPML_TM_Page_Builders_Hooks::link_to_translation_filter() requires 4 arguments and Media Library Assistant is passing only 3 of them.
We contacted the plugin author and he told us that the issue was resolved here: https://wordpress.org/support/topic/wpml-error-2/
If you get the error again, please use the development version mentioned in the link above (or the stable one that includes the fix, when it's released).

The new release is almost there. Our Developers are implementing last minor fixes to the issues found during the QA process. I'll let you know when it's ready.
While waiting for the new release you can contact your hosting provider and ask them for the server logs. Possibly we'll be able to find some hints what is loading so long.