Media Sync

Descripción

Puedes explorar todos los archivos que están en el directorio uploads y ver cuáles ya están incluidos en la biblioteca de medios y cuáles están simplemente allí. A continuación, puedes seleccionar aquellos archivos que quieres importar a la base de datos y, por lo tanto, hacerlos disponibles en la biblioteca de medios.

You can also use FTP to upload your files to uploads directory and bring those files into Media Library. 

Disclaimers

Please read before adding a support topic. Reviews are not intended for support or suggestions.

  1. «For developers»
    This plugin makes database changes (wp_posts and wp_postmeta tables), and it was primarily developed to help other developers that are aware of the consequences.

  2. «1 file first»
    Please be careful and try to import only one file first, to see if it works.

  3. «All at once»
    This plugin is focused on scanning, selecting, and importing all files at once. So it might not be great for huge amounts of files, since it can use up a lot of memory. Future versions will hopefully solve that problem. For now, you can try to go to Settings -> Media Sync and set it to scan only a specific directory.

  4. «Your setup is unique»
    Please keep in mind that each WordPress installation is unique, so it’s quite possible this plugin will not work in your case. If that happens, please turn on debugging in settings of this plugin, try to figure out why you have that problem, and then describe what you found in the Support section. The more details we have – it’s more likely the problem will be solved.

Ignored files

  • index.php,
  • various hidden files (.DS_Store, .htaccess),
  • WP generated thumbnails (files ending with for example -100×100.jpg),
  • WP generated scaled images (files ending with -scaled).

This is now configurable with a custom hook function and it can totally overwrite these rules or add additional ones.

Capturas

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

Instalación

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

FAQ

Stuck at importing / spins endlessly

Please try to increase max_execution_time (and/or memory_limit) 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.

Files not showing up in Media Library

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.

Doesn’t work

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.

Reseñas

7 de marzo de 2021
I ported a site from a proprietary CMS to WordPress and this plugin did all the media library inserts for me. It worked flawlessly! The move would have been a lot harder without this plugin. Thanks!
22 de enero de 2021
It totally fixed the issues I was having on my site with the image library. Worked like a charm!
28 de diciembre de 2020
Saved me tons of time, and the Smart File Time feature is brilliant. Thank you!
9 de diciembre de 2020
Found some files that were on the server and not in the library, and could tell where the duplicates were as well. I appreciate the feature that adds the date to the file based on the folder it was in, so old media doesn't get added to today's folder.
28 de noviembre de 2020
I have committed my code to SVN including file in upload/, And on another machine checkout that SVN repo, all the files in the upload were present in that new machine, but wasn't showing under media menu. I used this plugin and within just 3 steps all my files were showing under media menu. Thanks! it saved my whole lot of trouble and time.
26 de octubre de 2020
Besides working great as-is, I wanted to "auto-connect" my imported media to my WooCommerce Products via the SKU (which is in the filename). I saw a way to hook the plugin so I could do this. Erol was very receptive to the idea, and we got it done. If anyone has a similar need, let me know. My filter code might be useful to you.
Leer todas las 42 reseñas

Colaboradores y desarrolladores

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

Colaboradores

«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

1.2.5

  • New filter hook (media_sync_filter_before_update_metadata) which can be used to customize how metadata is updated or to run additional actions after file import.

1.2.4

  • Handle files with quotes (apostrophes) or other special characters in the file name.
  • Continue importing other selected files if there was an error with some of the files.
  • Show errors in UI instead of alert.

1.2.3

  • Better error handling and fallback when finding mime type

1.2.2

  • Fix meta data errors caused by invalid mime types

1.2.1

  • Much better error handling while importing

1.2.0

  • Optimized directory scanning to use less memory
  • New option to turn on debugging for this plugin
  • Changed parameters passed to media_sync_filter_is_scan_object_ignored hook function
  • Now requires PHP 5.5

1.1.8

  • Fix handling big («-scaled.jpg») images introduced in WordPress 5.3. These files will now be skipped and won’t be imported multiple times.
  • Add handy «Re-scan» button.

1.1.7

  • Fix issues when importing files containing special characters

1.1.6

  • Slight improvements with error handling in JavaScript

1.1.5

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

1.1.4

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

1.1.3

  • 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.

1.1.2

  • Fix Smart File Time on Windows server

1.1.1

  • 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)

1.1.0

  • [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.

1.0.4

  • Reduce the number of items to import per batch

1.0.3

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

1.0.2

  • Another fix for get_current_screen error

1.0.1

  • Fix get_current_screen error

1.0.0

  • 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

0.1.6

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

0.1.5

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

0.1.4

  • Add plugin localization
  • Add Serbian translation

0.1.3

  • Various improvements and fixes

0.1.2

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

0.1.1

  • Fix error on activation

0.1.0

  • Initial plugin features