Media Sync


Puedes escanear todos los archivos que se encuentran en el directorio «uploads» y ver cuáles ya están incluidos en la biblioteca multimedia y cuáles están simplemente allí. A continuación, puedes seleccionar aquellos que quieres importar a la base de datos y, por lo tanto, ponerlos a disposición en la biblioteca multimedia.

También puedes usar FTP para subir tus archivos al directorio «uploads» y usar este plugin para incluir esos archivos en la biblioteca multimedia. Existen otros plugins que se pueden usar para eso, pero con éste puedes seleccionarlos e importarlos todos a la vez fácilmente.

Por qué creé este plugin

En una ocasión, copié un sitio WordPress a un servidor diferente y la biblioteca de medios estaba vacía, a pesar de que todos los archivos se encontraban en el directorio «uploads» y la base de datos se había copiado. Así que tuve que usar otro plugin que me obligó a introducir manualmente cada directorio e importar los archivos en lotes para cada directorio. Pero necesitaba algo para, simplemente, importar todo a la vez, así que creé este plugin.

Files that are ignored:
– index.php,
– various hidden files,
– WP generated thumbnails – anything ending with for example -100×100.jpg.
This is now configurable with a custom hook function and it can totally overwrite these rules or add additional ones.


  • Página inicial
  • Ejemplo de selección de archivos a importar
  • Importación a la biblioteca multimedia en marcha
  • Importación completada


  1. Sube el directorio media-sync al directorio /wp-content/plugins/
  2. Activa el plugin en el menú ‘Plugins’ de WordPress


Q: Stuck at importing / spins endlessly
A: Please try to increase max_execution_time in php.ini on server (as described here). Or if you have too many files, try going to Settings -> Media Sync and change «Scan directory» to some inner folder.

Q: Files not showing up in Media Library
A: Please make sure «Dry Run» option is NOT checked. This is a safety mechanism to make sure you know what you’re doing, so be careful, try it first with just one file.

Q: Doesn’t work
A: Please first try to turn on debugging by adding this: define('WP_DEBUG', true); to your wp-config.php and check Network tab in Chrome DevTools to see what is going on in the background. Then report actual errors since it’s hard to help without knowing the error which is causing the problem.


18 de mayo de 2020
I Had Problems, with this plugin, with Media Library not showing thumbs, etc. In the end i deleted my whole hosting account, and started again. The only difference i see is LiteSpeedCache=On and WP CLI Login Command Server=On --both put their by my hosting company, and which i deleted first time around. Whatever the problem was, its not happening with my fresh hosting account. This plugin is working 100% - adding all my uploads to Media Library. Why this isnt already in wordpress makes me worry about wordpress. THANK YOU very very much.
30 de abril de 2020
This plugin found all media files and imported to database after I moved to new server.
28 de abril de 2020
Yes! Exactly what I was looking for - worked PERFECTLY. Thank you!
9 de abril de 2020
This plugin saved me to on a website redesign that I made on my local computer. When moving it back online, most of the media disappeared.
Leer todas las 22 reseñas

Colaboradores y desarrolladores

«Media Sync» es un software de código abierto. Las siguientes personas han colaborado con este plugin.


«Media Sync» ha sido traducido a 1 idioma local. Gracias a los traductores por sus contribuciones.

Traduce «Media Sync» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios


  • Fix issues when importing files containing special characters


  • Slight improvements with error handling in JavaScript


  • Always convert backslashes («\») to forward slashes («/») to fix various issues when using Windows Server.


  • Important backslash («\») vs forward slash («/») fix for use on Windows Server.


  • New option to set «Scan directory» in settings which will allow checking only certain sub directory.
  • New hook function media_sync_filter_is_scan_object_ignored which can be used to overwrite which files are ignored by default or to just skip additional files.


  • Fix Smart File Time on Windows server


  • Reduce the maximum number of items to import per batch from 20 to 10.
    So batch sizes are now: 1 (importing 1 to 10 items); 5 (importing 11 to 100 items) or 10 (importing more than 100 items)


  • [IMPORTANT] Date of imported Media Library items now defaults to the current date.
    But there are options to choose before importing and also a possibility to overwrite that using the custom hook.
  • New options page with the option to disable and hide «Dry Run».
  • Fix Media Library filter that was showing all items when the filter didn’t find any result.


  • Reduce the number of items to import per batch


  • Support multisite network by changing required access capability from update_plugins to import


  • Another fix for get_current_screen error


  • Fix get_current_screen error


  • New option to clean up Media Library from items that are missing actual files (using custom Media Library filter)
  • New filter when scanning uploads directory which can help to show only files missing from Media Library


  • Fix PHP short array syntax
  • Update required PHP version to 5.4


  • Date of imported Media Library item is now set based on file modification timestamp


  • Add plugin localization
  • Add Serbian translation


  • Various improvements and fixes


  • Fix sorting of directories and files
  • Minor wording changes and code cleanup


  • Fix error on activation


  • Initial plugin features