Looks like people are waiting for the new importer. Until then, if you are super annoyed by these errors, we can change the code manually, because it won’t be updated anyway.
https://core.trac.wordpress.org/ticket/24373#comment:46
change line
66 to
public function __construct(){ /* nothing */ }
The complete fixed file wordpress-importer.php can be downloaded here.
http://pastebin.com/14xJER5S
It is php7 compatible and working on wp 4.4
It also has fixes from other threads. You can do a compare using winmerge. 🙂
Replace the content of that file with the content at pastebin
it has also fixes from (note : never tested these).
https://wordpress.org/support/topic/importer-raises-errors-with-wp_debug-mode-on
https://wordpress.org/support/topic/notice-wp_get_http-is-deprecated-since-version-44
Thanks a lot @backups! this made import work on PHP 7 for me.
Hmm with my current PHP 7 setup and WordPress 4.5.2 I am getting an issue with a warning that a method and class cannot have the same name
( ! ) Deprecated: Methods with the same name as their class will not
be constructors in a future version of PHP; WP_Import has a deprecated constructor in
/srv/www/sub.domain.com/current/web/app/plugins/wordpress-importer/wordpress-importer.php on line 38
So current pastie offered by BackuPs needs an update.
Hi
what does line 66 say in your file?
it should say
public function __construct(){ /* nothing */ }
and not
function WP_Import() { /* nothing */ }
This link was posted above but not really a big deal about it:
WordPress Importer Redux
You should check it out before reading any other solutions – it is a rewrite of the plugin which actually works and will become the official v2 of the plugin when its finished.
This information should be pushed into the description of the official plugin as I ended up with a mess of data trying to figure out what was going wrong.
That’s awesome, it worked immediately for me. Looks much better too.
The old version was just telling me it was failing but not why.
Thanks rtpHarry!