Skip Navigation

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

Problem:

How to reduce the size of WPML database tables?

Solution:

Please, back up everything before proceeding. And test the following on a staging area first.

For the icl_sitepress_settings option, you can keep it to be not autoloaded. Furthermore, you can reduce the wp_options table size by following these steps:

These option names have high amount of data and here's how you can reduce it:

- wpml_notices: can be deleted
- wpml_strings_need_link_fixed: can be reduced by running the Translate Link Targets option under WPML β†’ Settings.
- _wpml_tp_api_logger: can be deleted
- WPML(logs) can be deleted
- wpml_tp_com_logs can be cleared from WPML > Support > communication log

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 16 replies, has 3 voices.

Last updated by andyZ-4 1 year, 7 months ago.

Assisted by: Ahmed Mohammed.

Author Posts
April 5, 2023 at 3:48 pm #13411859

andyZ-4

Hi! Our autoloaded icl_sitepress_settings is 510803 and I also see a icl_st_settings that is 42835. Are both of these required for WPML?

We are having major issues and our hosting company is saying our autoloaded data is the biggest contributor.

Thank you!

Joel

April 6, 2023 at 1:57 am #13415045

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

Thank you for contacting WPML support!

I understand that your hosting company informed you that some WPML data in the website's database are causing problems.

The data you mentioned are required for WPML to work correctly. With that said, our developers are already working on a solution to not autoload everything.

I will link this ticket to our developer's one and update you once I have news. Please note this will probably take a while; thanks for your patience.

April 6, 2023 at 10:59 am #13418997

andyZ-4

Hi Ahmed, yesterday before you responded I changed icl_site_settings to not be autoloaded and the website continued functioning correctly and our CPU usage dropped to a healthy level. I noticed that we also have an icl_st_settings that I left as autoloaded as well as WPML(TM), wpml-tm-custom-xml, and WPML(ST-MO). I left all of those as autoloaded. What issues could occur from changing icl_site_settings to not be autoloaded? This issue needs to be escalated with your team since our very expensive hosting plan on WP Engine cannot handle the massive amount of autoloaded data coming from WPML.

Thank you!

Joel

ninjaone-phpmyadmin-wpengine-net-WP-Engine-wp_ninjaone-phpMyAdmin-5-2-1.png
April 7, 2023 at 2:33 pm #13428033

Andreas

Thank you for your reply

Please check the answer to your question here:

https://wpml.org/forums/topic/wpml-autoloaded-data/#post-11436777

Regards,
Andreas

April 11, 2023 at 1:30 pm #13446379

andyZ-4

Do you have an ETA on when WPML will have a solution to not autoload everything as Ahmed mentioned above? We cannot afford to have our website going down because of a massive amount of autoloaded data from WPML causing 502 errors on WP Engine. Our primary issue is the icl_sitepress_settings size. I've moved the XML config out of the database and that helped a little, but not much. We may need to look into an WPML alternative if this autoloaded data issue can't be resolved soon. Thank you!

Joel

April 11, 2023 at 10:02 pm #13450529

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

I'm afraid we don't have an ETA for the release that will include the fix for this issue.

Yet, I would like to check if it is possible to clone your website and pass it to our devs to take a look.

If that's OK, please provide me access to a staging area, and I will take care of the cloning process.

The next reply is private in case you want to provide us with access details to the staging area.

Looking forward to hearing back from you.

April 13, 2023 at 8:43 pm #13468487

andyZ-4

Hi Ahmed, I tried to copy the current website to our staging environment but the copy process is failing due to some fatal error related to WPML. Wp Engine said the copy was failing at the search and replace and that they did some testing on the staging site and when running a search and replace they are getting an error related to the WPML plugin.

PHP Fatal error: Uncaught Error: Class "WP_Upgrader_Skin" not found in /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-installer-upgrader-skins.php:3
Stack trace:
#0 /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-otgs-installer-autoloader.php(18): include()
#1 [internal function]: OTGS_Installer_Autoloader->autoload()
#2 hidden link): unserialize()
#3 hidden link): WP_CLI\SearchReplacer->run_recursively()
#4 hidden link): WP_CLI\SearchReplacer->run()
#5 hidden link): Search_Replace_Command->php_handle_col()
#6 [internal function]: Search_Replace_Command->__invoke()
#7 hidden link): call_user_func()
#8 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()
#9 hidden link): call_user_func()
#10 hidden link): WP_CLI\Dispatcher\Subcommand->invoke()
#11 hidden link): WP_CLI\Runner->run_command()
#12 hidden link): WP_CLI\Runner->run_command_and_exit()
#13 hidden link): WP_CLI\Runner->start()
#14 hidden link): WP_CLI\Bootstrap\LaunchRunner->process()
#15 hidden link): WP_CLI\bootstrap()
#16 hidden link): include('...')
#17 /usr/share/wp-cli.phar(4): include('...')
#18 {main}
thrown in /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-installer-upgrader-skins.php on line 3
Fatal error: Uncaught Error: Class "WP_Upgrader_Skin" not found in /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-installer-upgrader-skins.php:3
Stack trace:
#0 /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-otgs-installer-autoloader.php(18): include()
#1 [internal function]: OTGS_Installer_Autoloader->autoload()
#2 hidden link): unserialize()
#3 hidden link): WP_CLI\SearchReplacer->run_recursively()
#4 hidden link): WP_CLI\SearchReplacer->run()
#5 hidden link): Search_Replace_Command->php_handle_col()
#6 [internal function]: Search_Replace_Command->__invoke()
#7 hidden link): call_user_func()
#8 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()
#9 hidden link): call_user_func()
#10 hidden link): WP_CLI\Dispatcher\Subcommand->invoke()
#11 hidden link): WP_CLI\Runner->run_command()
#12 hidden link): WP_CLI\Runner->run_command_and_exit()
#13 hidden link): WP_CLI\Runner->start()
#14 hidden link): WP_CLI\Bootstrap\LaunchRunner->process()
#15 hidden link): WP_CLI\bootstrap()
#16 hidden link): include('...')
#17 /usr/share/wp-cli.phar(4): include('...')
#18 {main}
thrown in /nas/content/live/ninjastage1/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-installer-upgrader-skins.php on line 3
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

Do you have any insight into why this error might be happening?

Thank you!

Joel

April 13, 2023 at 10:13 pm #13468891

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

The "Class not found" issue is generally caused if the file containing the required class is either missing or not loaded properly.

While I'm not sure how the search and replace process works on WPEngine servers, I can either log in to the production website, install a plugin and do the cloning, or I can setup a website on our servers and let you migrate.

Please let me know how you would like to proceed πŸ™‚

April 17, 2023 at 12:42 pm #13487805

andyZ-4

Hi Ahmed, I'm going to give you access to our staging environment, could you please enable a private reply for me to share that access info? Thank you!

April 18, 2023 at 2:00 pm #13496707

andyZ-4

Hi Ahmed, could you please enable a private reply for me? Thank you!

April 18, 2023 at 6:18 pm #13498881

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

Sorry for the delayed reply, I had a longer weekend πŸ™‚

I have enabled the private reply. Please provide me with the login details and I will look into this as soon as possible.

Looking forward to hearing back from you.

April 19, 2023 at 12:58 am #13500351

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

I was able to clone the staging area. I wanted to let you know in case you want to delete it.

On the other hand, I checked the database tables locally and I can see that the "icl_sitepress_settings" option is set to not to be autoloaded (check screenshot). Is it the same on the production version of your website?

If that's correct, did you have any issues with your installation so far?

I'm going to escalate this as promised, I'm just collecting some information for our devs.

Looking forward to hearing back from you.

20230419 at 02.56.32.png
April 19, 2023 at 12:10 pm #13504515

andyZ-4

Hi Ahmed, I did set icl_sitepress_settings to not be autoloaded out of desperation because our website was giving 502 errors until I made that change. Your team had said that it was necessary for it to be autoloaded, but I haven't seen any issues since I made that change. Thank you for escalating this!

Joel

April 19, 2023 at 9:16 pm #13507997

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

Thank you for the information.

I have escalated this and also required some clarification about setting that option not to be autoloaded.

I will keep you posted πŸ™‚

April 27, 2023 at 5:53 pm #13552369

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+02:00)

Hi Joel,

I have some news (I will let you decide whether they're good or not πŸ™‚ ).

For the icl_sitepress_settings option, you can keep it to be not autoloaded. Furthermore, you can reduce the wp_options table size by following these steps:

Please, back up everything before proceeding. And test the following on a staging area first.

These option names have high amount of data and here's how you can reduce it:

- wpml_notices: can be deleted
- wpml_strings_need_link_fixed: can be reduced by running the Translate Link Targets option under WPML β†’ Settings.
- _wpml_tp_api_logger: can be deleted
- WPML(logs) can be deleted
- wpml_tp_com_logs can be cleared from WPML > Support > communication log

I'll also keep this ticket open and update you when the reported issues are fixed.