Support » Plugin: Attachment Importer » Works, but you need to know a couple of things

  • This plugin works, but you may need to be aware of a couple of things that can cause it not to work – and then address those things before using this plugin.

    The first thing to be aware of is that there is a bug (apparent) in the standard WordPress Export feature that you will use on the source site to export your content.

    When using the WordPress Export, the only way to get the media attachments information included in the Export xml file is to select to export “All”. This will export all content in your source site, which may not be what you want, but is what you will have to do if you want to use this plugin to import attachments. If you don’t use the “All” setting during your export, you will get no attachment information included in the export file and then this plugin will tell you that you have no attachments.

    Assuming you have an export file that has attachment information in it, then this plugin will work, as long as the source WordPress site is on a server that has an IP address that matches the IP address for the site in the public DNS. This may not be the case if your source server is self-hosted on your own LAN. The plugin will use your internal DNS server and find the source site at an internal private IP address.

    This will be a problem because of a WordPress “feature”. WordPress has added to the core at some point a check for whether or not a host is “safe” when using wp_http_get (which is what this plugin uses to fetch the attachment from the source site).

    So, on an internal LAN, the wp_http_get will fail everytime until you add a filter to your functions.php file. See this blog post for the filter to add: http://steadman.io/blog/2013/10/31/media-imports-fail-self-hosted-wordpress-sites-same-network/

    After encountering and overcoming these two issues, I was able to successfully import 755 image attachments using this tool.

    I am giving it 4 stars instead of 5 because it should mention somewhere in the documentation about the bug in the WordPress Export function and that you have to use the export “All” option in order to have a usable XML file for this plugin to properly do its thing.

  • The topic ‘Works, but you need to know a couple of things’ is closed to new replies.