Home›Support›English Support›[Escalated to WPML Developers team] Reducing size of 'wpml_strings_need_links_fixed' in wp_options
[Escalated to WPML Developers team] Reducing size of 'wpml_strings_need_links_fixed' in wp_options
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.
Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
I noticed that the autoloaded option wpml_strings_need_links_fixed in the wp_options table is taking up about 1.23MB — roughly one-third of the total size of my wp_options table. I'd like to reduce its size, preferably significantly, to keep the performance of my site optimal.
1. Could you please explain the purpose of this option?
2. As a follow-up: I assume this is some kind of to-do list for links that still need fixing. Is there a way for me to process or clear these items so the option size is reduced? For example, do I need to regularly run the “Translate Link Targets” scan to handle these strings, or is there another recommended approach?
Please advise me on the best way to clean up or reduce this data.
I have received a reply from our second-tier supporter about this case.
First, I want to say that we have a known issue with that option and plan to improve it. Here is the full explanation from our second-tier supporter.
There is a scenario where links need fixing when you have an internal target page (that links will point to) which is not translated. You then add a post that links to that page, and you translate this new post. The new translation cannot be adjusted at the time to point to the translation of the target page, because it doesn't exist yet. Assuming the target is subsequently translated, the link in the translated post can be adjusted to point to it.
That is what the batch process in WPML > Settings > Translate Link Targets is intended to do, and the option is supposed to help with that.
But there is a problem where the option keeps growing and doesn't get emptied out (which we need to fix). In the meantime it should be safe, after running the batch process to fix links, to then delete that option from wp_options. As you add more content that corresponds to the scenario described above the option may be added back and grow, and it can be cleared periodically. Once we have fixed the issue that would no longer be necessary.
For the time being, please proceed with our second-tier supporter suggestion. The issue has been escalated to our developers, and we'll let you know once a fix for it is included in a WPML.