Background of the issue:
I am trying to use WPML Media Translation on my site hidden link, which has over 10K articles and probably 50K+ images accumulated over 15 years. The server setup includes a memory limit of 8192M, max memory limit of 4096M, and PHP version 8.2.29. I have disabled unneeded plugins but cannot disable the theme on a live site.
Symptoms:
The Media Translation setup does not finish and displays a non-specified 'error' after about 20 minutes when it reaches approximately 20%.
Questions:
Is there a way to skip the step where the plugin processes every image?
If you still need to set it up, can you please do the following:
Please follow the instructions mentioned on this page: https://wpml.org/documentation/support/debugging-wpml/
Then, try to reproduce the issue and check your installation's **wp-content** folder to see if a file named **"debug.log"** was created (it will only be generated if a server error occurs).
If the file was created, please upload it to a platform like **Google Drive** or **Dropbox** (whichever you usually use) and share the link with me (make sure it is publicly accessible) so I can analyze it.
Hi, I actually only wanted meta not separate images. But it seems it started processing all images 🙁 Now I have media library full of duplicated images 9 instances of each image ... and I have to way to clean them up. I hope this doesnt affect SEO or site. The images were not duplicated on server in actual upload folders only in media library.
I have deactivate all WPML connected plugins and installed Media Deduper but it is processing for hours now and is still not finished even finding all the copies so i have no idea if I will be able to fix this.
Hosting sent me an email that ClouFlare was causing "timeout" error and that is why it didn't finish pricessing. But the multiplied images appeared some time after.
No, it won't affect SEO. And it won't take server space. As you noted that files are not duplicated, just the DB entries.
We suggest the Media Deduper, it was effective in many cases for this problem. Please allow it a bit more time. If it does not work we may need to involve our second tier support and try to do it directly in the DB (we will need an staging site to test it first).
Hi, it took a few days for the complete scan but it displays:
Looks like 398351 of 398417 media items are duplicates. Consider bulk smart deleting duplicates. I would say this is not correct because there is 10K+ posts, some have multiple images.
So I do not think it would be safe to use Media Deduper Smart Delete option.
I don't know how your plugin created so many duplicates if it said it failed after just a few minutes.
Is it possible for you to provide us with a copy of the DB so we can take a deeper look? I enabled a private reply so you can share a download link safely.
I am not sure what that will solve since I we are posting new content all day. Even if you would manage to clean it it would be autdated in 1 hour and unsable again.
I tried to run Deduper but it just hangs the website and it becomes too slow. We cannot affrod to have slow site for days to even process all the images.
Then it will probably completely fail when attempting to clean the images.
The site is about 100GB we can't make staging probably. It will also be outdated very fast when posting new content on live site ... The database itself is now 2.73GB
What's the current state of your site? Did you deactivate WPML or just WPML media? If you activate just WPML core, how does the media library look like?
WPML media never activated it just kept displaying message to index the files first. If I knew it will create duplicates i would not click that message in the first place.
The media duplication is not due to Media Translation. WPML also needs it to display the images in all the languages. This will be improved in the next release that's coming soon, but the attachments entries are created per language with just WPML.
If you didn't reset WPML and just deactivated it and deleted it. It may be possible to create a query to remove all the duplicated images. If you reset WPML the language information is lost, and then we can't identify which attachments were created for secondary languages.
That said, we can't test and provide the query in your production site, that's too risky. So, if you can provide us with a DB dump, we can take a look. It doesn't matter if it gets outdated because all the attachments that were duplicated will be already there (as you have WPML deactivated).
You may have seen a problem when activating Media Translation. But the image attachments were already duplicated. With WPML active, you didn't see them because they are sorted by language in the media library.
I am enabling a private reply in case you want to provide us with a download link to take a look at the DB.
Again, I am truly sorry for the inconveniences, and thank you for your patience and understanding.
Hi, I cannot give you a DB dump, because the max allowed file size is 2 MB, and the DB is 2,5GB 🙂
The duplicates were created with the WPML installation.
I have another WPML installation on my e-commerce WP store, and it never did that - I always had to do it manually. It seems that this new WPML version has an auto-enabled option to create image translation as duplicates.
I have been using WPML since 2019 on my WooCommerce site and never had this kind of problem.
I am not sure if we have the capacity on the server to create some sort of staging site. I will have to ask the hosting company and it is probably going to cost us to do this ...
It will probably not be a good idea to upload DB back to the live site? It is easy to play with a small site, but in this case it can take hours to restore it if something goes wrong.
I understand, but I am not suggesting to upload a backup.
Let me summarize:
- WPML was deactivated and there is a left over of duplicated attachments
- These attachments are not physical files but DB entries
- You don't want to reactivate WPML but to remove those entries
Is this accurate?
To do so, if the language tables weren't deleted, we can try to figure out a query to remove the duplicates. To do so, we need a copy of the DB to test it safely on our end.
Once we have the query, I'll share it with you so you run it on your end. For this, you must have a reliable backup. This isn’t just for WPML—it’s a best practice before any update or bulk change.
Makes sense?
Best Regards,
Otto
The topic ‘[Closed] Media Translation Setup will not finish’ is closed to new replies.