Hi, so there is no other option than via query? This is done via PHPmyAdmin?
If I reactivate the plugin, there is also no option to delete the history/DB entries?
The backup of the entire server is done every night.
One other thing - the DB also contains user data and information that is not supposed to be shared according to GDPR and privacy laws, so I am not sure how we can solve this.
If you have a backup, can you please confirm the following:
- ❌ Please make a full website backup before proceeding ❌
- Activate WPML core (do not activate WPML Media)
- Go to Dashboard > Media
- Do you see duplicated images?
You shouldn't, in this case images should be sorted by language. So, in each language you should see only one image (you can confirm it using the language switcher in the admin bar). Check this screencast: hidden link
When WPML is deactivated, is like selecting all languages. And that's why the media seems messy.
Hi, I followed your instructions but these duplicates are only in original languages' media library. Translations do not have these duplicates in library. There were not even that many languages that there are these multiplied images in the original library but they all have the same name/file name and none of the fields are translated. Even images in the respective language ML are not treanslated.
I have double checked and files are not multiplied on the server in WP folders.
Like I have explained, I am using WPML on my ecommerce store and it is working fine - it never created this kind of scenario. I always had tu upload separate images if I wanted the files in multiple languages.
When you deactivated WPML before, did you "reset" it? If you did, images lost language information and when you activate it again they are considered to be in the default language. But still, this does not explain that there are more duplicated images than languages...
There we suggest the Media Cleaner plugin, maybe this one works on your site.
Before trying it, please try this:
❌ Please make a full website backup before proceeding ❌
Go to WPML → Support → Troubleshooting and click (once each):
- Clear the cache in WPML
- Set language information
- Fix post type assignment for translations
- Remove ghost entries
Hi, I did not reset it, I just deactivated it, then deleted, because the duplication cleanup plugin was running extremely slow and i was trying out what could be done.
If it was reset, then there would probably be no images in the other languages now that i have reactivated it?
I tried the Troubleshooting options now but the did not remove the multiple instances of the same image.
I can try the plugin tomorrow morning since the backup is done at night between 0:0 and 6 am ant it takes some time - I cannot do it manually.
If you reset WPML and enable it again, it may be duplicated images in the default language and only one in the secondary languages. So, that may be a reason of the issue. But as you said it was not reset, we discard it.
Let me know if the Media Cleaner plugin helps and we will move forward from there.
I have noticed that the reset option is on this Support > Troubleshooting page so I have 100% not reset it. I will let you know how Media Cleaner works ASAP. The problem with other plugin was that it took 3 days just to index images and it didn't finish and it also slowed down the site and admin area was loading up to 1 min for every click.
Hi, it's working for 2 days now and is more or less stuck on around 90% for about 6 hours now so I'm not sure this will solve anything because cleaning will probably result in server hanging again.
I did notice that WPML created new multiplied files for the newly uploaded images when I deactivated it again after being activatedfor 2 days. But this time it created as many image instances as number of languages set in settings not 3x as much as when acivated meadia translation plugin.
Having the media duplicated after deactivating WPML is expected and that media can be removed re-enabling WPML and deleting them from the Media Library switching languages.
What puzzles me is the media duplicated in the original language, the media that when you re-enable WPML remains duplicated in the default language.
We need to take a deeper look at your site. I know that it's a big site, but I don't see any other way that we can get to the root cause of this problem.
Can you please provide us with a copy of the site? DB + wp-content folder will do. You can exclude uploads as the duplicated images are not files but DB entries.
I am enabling a private reply, as the package size will be big, you'll need to upload it to an external service (like WeTransfer, Dropbox or GDrive) and provide us with a download link.
Hi, I have stopped cleaner addon because it was using up too many resources and it was stuck on only 5% on stage 4/4 for whole day. It's just too many BD records to clean it with plugin it seems.
I was talking to the hosting provider and they said they could create a staging site on subdomain and lock/hide it from live traffic or to create a completely new copy on standalone server, but that would be quite expensive so I do not really want to go that far.
Staging might be the best option?
You have to understand that the site is 15 years old and that there is thousands of images even without duplicates in Uploads folder so it's not just something you can easily copy or upload somewhere.
We don't need the Uploads folder, the duplication is on the DB, as you mentioned.
Better than a staging site would be a copy of the DB and of the wp-content folder (excluding uploads). With that, we should be able to deploy your site locally and that way we have more debugging tools available to investigate the problem.
OK but the site will not be live or accessible anywhere? And you will also purge all the data after checking? As I said there is a lot of data in the database. Then I can try creating ZIP file via dropbox maybe.