If you’re running WordPress and trying to export and import posts with the [WordPress Importer](http://wordpress.org/extend/plugins/wordpress-importer/) you may be getting an error saying `Failed to import Media`
Fortunately this plugin allows error debugging – you just have to turn it on. You can figure out what is causing the error by turning debugging on. There are two methods for this.
First, you can edit the plugin file:
/wp-content/plugins/wordpress-importer/wordpress-importer.php
Change line 17:
define( ‘IMPORT_DEBUG’, false );
to instead be `true`:
define( ‘IMPORT_DEBUG’, true );
You can also edit your `wp-config.php` file and add this line:
define( ‘IMPORT_DEBUG’, true );
That should hopefully help you stop this error:
However since the plugin will attempt to redefine a constant that is already defined it may add errors to your log files, which means you should probably use the first method, or just remove line 17 from the plugin file.