• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Welcome to the world of Anagram Engineering
  • Who we are
  • Leistungen
    • Web Development
    • Embedded Systems
  • References
    • Customers
    • Webdesign & Webapps
    • Mobile Apps
    • Embedded Systems
    • Cloud Apps
  • News

Search

Anagram Engineering

Webdesign und Softwarelösungen aus Vorarlberg. Ihr Partner für innovative Lösungen rund ums Internet. Full Service Agentur.

September 6, 2016 by Harald

Remove media duplicates – wpml-media

Recently i ran into a problem with wpml-media. I actually executed wpml-media admin area twice, ran into an error and restartet it (i believed i did something similar when testing wpml-media without any problem, this time though, on my production server & database i generated 10 duplicates for each entry. Holy moly! There was actually no problem on the client side, everything was still working, but going from 2.5K media entries to 20K was not an option at all.

At the same time, people where adding new data already, so using a complete backup was no option as well. What i did in the end was the following:

media data dump of my backup data

mysqldump DATABASE_NAME -u DATABASE_USER -p wp_posts --where="post_type = 'attachment'" --no-create-info > data_dump.sql

restore dump

mysql -u DATABASE_USER -p < data_dump.sql

This way, i lost only media entries recently created. But all posts, events and other stuff is still there. After looking into wp-uploads, in only found five created images. So i recreated them manually and now i’m looking again at 2.5K media entries. Looks better to me 🙂

Filed Under: Wissenstransfer

About Harald Entner

Since january 2013 Harald is CEO of Anagram Engineering.

After he has finished his study in computer science at the Technical Universicty of Vienna he worked in Vienna, Munich and Dornbirn as software engineer, software architect and system developer.

Today he enjoys travelling, learning new languages and frameworks, systems, environments and tries to educate hilmself within these domains.

Primary Sidebar

Recent Posts

  • Zumtobel PROset App | Rebranding February 3, 2021
  • Speed matters July 2, 2019
  • Vienna calling June 18, 2019
  • Resclite Pro April 12, 2019
  • Zumtobel PROset App April 10, 2019

Legal

  • AGB
  • Impressum

Footer

Contact US

Stiegstrasse 24
6830 Rankweil

+43 650 925 62 64

About US

Anagram Engineering develops software for Web, Mobile, Tablet and embedded devices.

Learn More

© 2026 · Anagram Engineering

  • terms & conditions
  • impress
  • customers
  • References
  • who we are
  • Deutsch
  • English