Make WordPress Core

Opened 13 years ago

Last modified 5 years ago

#18602 new defect (bug)

Media Library imported, but all items Unattached

Reported by: awallin's profile awallin Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Import Keywords: reporter-feedback needs-patch
Focuses: Cc:

Description

Export XML file from one site, import into another site. By checking "Download and import file attachments", files from wp-content/uploads are downloaded correctly to the new site, and added to Media Library. However all items in the Media Library are now "Unattached", and for example posts using [gallery] are broken on the new site.

Change History (7)

#1 @duck_
13 years ago

  • Keywords reporter-feedback added

Please ensure that you are using the latest version of the importer (currently 0.5). Also try importing without any other active plugins in case of any conflicts.

An example attachment <item> from the export file and, even better, a whole export file which doesn't work for you would be useful to help reproduce this.

#2 @awallin
13 years ago

The entire XML-file for my site is now over here:
http://www.anderswallin.net/sandbox/anderswallinnet.wordpress.2011-08-31.xml

When trying to import the entire 7.5Mb file I got "500 Internal Server Error", so I split up the file into roughly 1Mb chunks which the server seems to handle better.

It's also slightly annoying that the importer appends "1" to a file every time it downloads it but finds the same file is already on the disk. I end up with "file.jpg", "file1.jpg", "file11.jpg", and so on.

#3 @awallin
13 years ago

I have now tried this with a local wordpress install. On this install importing the entire 7.5Mb XML file does not timeout, and media library items do get attached to their correct posts.

So the issue is that importing a 7.5Mb XML file which has 1.5Gb media (about 11000 files in /wp-content/upload/) associated with it seems to timeout, or result in "500 Internal Server error" on my main webhost.
Googling turns up a number of fixes such as this:
http://wordpress.org/support/topic/plugin-cp-import-tips-and-tricks-avoiding-script-time-out
or this:
http://nick-hoffman.blogspot.com/2009/09/importing-large-wordpress-blogs.html
but they require access to the php and/or apache configuration files on the host, which I suspect most people will not have.

Thus it would be nice if wordpress-import/export could be made to work correctly on sites where the user does not have access to php/apache config-files and any large (>1Mb) XML-file will result in a timeout or 500 error.

#4 @SergeyBiryukov
12 years ago

  • Milestone changed from Awaiting Review to WordPress.org

#6 @frederick.ding
11 years ago

  • Cc frederick.ding added

#7 @chriscct7
9 years ago

  • Keywords needs-patch added
  • Version changed from 3.2.1 to 3.2
Note: See TracTickets for help on using tickets.