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: Bug, Custom Work, Not WPML issue
This topic contains 87 replies, has 4 voices.
Last updated by George Botsev 1 year, 11 months ago.
Assisted by: George Botsev.
Author | Posts |
---|---|
June 23, 2023 at 7:35 am #13882205 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
I forgot to mention that if you want to just hide content in the other languages, you can just hide the whole language in WPML > Languages > Hide languages section -> https://wpml.org/documentation/getting-started-guide/language-setup/hiding-languages-on-the-front-end/ And if you want to hide specific posts, you can mark them as a draft by going to the post listing page selecting all posts that you want to edit and using "Quick Edit" and setting them as "Draft" in the post status. |
June 23, 2023 at 8:14 am #13882597 | |
niccoloB-7 |
Hi, Below are my server settings:- My server has: 16 CPU and 64GB RAM max_execution_time 72000000 I disabled all lang from here, hidden link It doesn't show any progress bar, it just keeps spinning, but after 20 to 30, it stops, and when i check, all the translations are still there. This is why i asked for help from you so that you will help remove all the translations on my site, as your guide to remove translations is not working. I dont want to keep translated content, so RESET is not what i want, i first want to remove all data then i will reset. Will you help me here? My site login as well as SSH is already shared. PLease help me remove all the data by WPML inside database, e.g. WPML STRING TRANSLATION PLUGIN DATA, WPML MEDIA PLUGIN DATA, WPML Multilingual CMS PLUGIN DATA, etc Thanks! |
June 23, 2023 at 8:28 am #13882687 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
I think that I can help you. I suspect that the action to remove the language contents fails because there are too many elements - our developers are in the process of improving that in future versions. We always can do the following as a workaround: |
June 23, 2023 at 8:30 am #13882697 | |
niccoloB-7 |
Hi, DO whatever you want, but i just want the cleanup, i hope you understand 🙂 Please update me once you start the cleanup process. Thanks! |
June 23, 2023 at 8:40 am #13882775 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
I am currently attempting the process of removing a language - in order to get a better idea what happens. |
June 23, 2023 at 9:51 am #13883323 | |
niccoloB-7 |
Hey, What's the update? |
June 23, 2023 at 10:10 am #13883387 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
Okay, I see the issue. You have more than 10k attachments (Media elements) per language. As our policy explicitly forbids me to do destructive actions on a production instance, I can only provide you with SQL queries that you can execute on your MySQL server and that can help with removing the attachments (media elements), and after that is done, perhaps you can try to re-run the same process - but this time it should not fail and should remove the posts. As usual, I cannot stress enough that this is a highly destructive action and you should have a backup and consider that this is not reversible in any other way. First, this has to complete without errors in order to not leave orphaned entries: DELETE FROM `wp_postmeta` WHERE `post_id` IN (SELECT `element_id` FROM `wp_icl_translations` WHERE `source_language_code` IS NOT NULL AND `element_type` LIKE 'post_attachment') Second, this has to complete without errors in order to not leave orphaned entries: DELETE FROM `wp_posts` WHERE `ID` IN (SELECT `element_id` FROM `wp_icl_translations` WHERE `source_language_code` IS NOT NULL AND `element_type` LIKE 'post_attachment') Third - remove the entries from the WPML table related to attachments (media elements) only: DELETE FROM `wp_icl_translations` WHERE `source_language_code` IS NOT NULL AND `element_type` LIKE 'post_attachment' So after you test the queries and remove the attachments, you can go to WPML > Languages and try again the process to remove the languages from there. Do note that if you execute the queries with PHPMyAdmin for example, it might fail due to the sheer amount of elements that have to be processed at the same time. So in that case you might have to retry until you get 0 rows affected. |
June 23, 2023 at 10:31 am #13883571 | |
niccoloB-7 |
Hey, As long as you know what you are doing, there should be no issue running any sql query you gave above. This should not be destructive if command is right. Do you want me to run all the SQL query from start to end? Or you want to do it? I want you to do it because you are expert in this so you will exactly know what you are doing? I have full backup of server incase anything goes wrong, yo can tell me. But i want you to be sure on what you are doing because we have already wasted alot of time and our business is going down. If you want me to add you SSH , give me the key? Thanks! |
June 23, 2023 at 11:26 am #13883797 | |
niccoloB-7 |
I will request you to work on this as soon as you can, we cant wait more 🙁 |
June 23, 2023 at 11:28 am #13883799 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
I am sorry but I am not allowed to run destructive actions in a production environment. |
June 23, 2023 at 11:39 am #13883887 | |
niccoloB-7 |
Hi, I am allowing you to do so, so why not? I have backup, i can restore from it. I cant waste my time creating staging site, i dont have time. Please understand, and proceed with the task. I want to fast forward the issue. SO please do that. Thanks! |
June 23, 2023 at 11:47 am #13883985 | |
niccoloB-7 |
Are you proceeding? |
June 23, 2023 at 11:52 am #13884059 | |
niccoloB-7 |
I am telling you to do because if i did and see any error while running the given query, i will not be able to understand that. So i want you to do it with your expertise. Think that this is my staging site, and proceed with the cleanup, let me know when you are proceeding? Please dont take more time because our business is already down from last 3 days, lost 1000s $ of sales. |
June 23, 2023 at 12:07 pm #13884087 | |
George Botsev WPML Supporter since 02/2014
Languages: English (English ) Timezone: Europe/Sofia (GMT+03:00) |
Unfortunately, I am not allowed to do this on a production site. I have provided you with the queries which will clear the duplicated media items and the same queries can be adapted for other post types - products, pages, posts & etc. If you need further assistance with this, perhaps you can hire one of the contractors: https://wpml.org/contractors/ |
June 23, 2023 at 12:15 pm #13884201 | |
niccoloB-7 |
So you first spoiled out site and now saying to hire a contractor 🙁 Even if you do that in staging you still have to do it in production, because its your plugin and i need the cleanup from your plugin. Also who will decide if site is in production or staging? Me, right? This site is staging, please proceed with WPML cleaning, and please dont come up with another excuse. Thaks! |