Opened 13 years ago
Last modified 6 years ago
#18602 new defect (bug)
Media Library imported, but all items Unattached
Reported by: | 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)
#2
@
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
@
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.
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.