• 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

© 2025 · Anagram Engineering

  • terms & conditions
  • impress
  • customers
  • References
  • who we are
Manage Cookie Consent
Wir benützen Cookies um unsere Website und unsere Services zu optimieren.
Funktional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistik
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
Einstellungen
{title} {title} {title}
  • Deutsch
  • English