Support » Plugin: Add From Server » Import breaks if source directory starts with `uploads`

  • When I have a directory of images in wp-content/uploadstomiport/ (and regular wp-content/uploads/) the import process breaks.

    The files are not copied to wp-content/uploads/ but are size-generated inside the wp-content/uploadstoimport/ source directory instead. Then the importer adds the file path to database with the wp-content/uploadstoimport/ path instead.

    Then WordPress does some stupid automated fixing which renders the URLs themselves to be wp-content/uploads/toimport/ instead of wp-content/uploadstoimport/ (all imported files go 404 because of that).

    So I just imported over a thousand images which resulted in over a thousand utterly broken images in the media library, and I had to clean the database through raw MySQL queries.

    Just a heads up, don’t use the word uploads in your directory where you import images from.

  • The topic ‘Import breaks if source directory starts with `uploads`’ is closed to new replies.