import - WP CLI not importing media files

When I tried on localhost, it appears media files are imported. When I tried on real server (AWS LightSail) seems like i

When I tried on localhost, it appears media files are imported. When I tried on real server (AWS LightSail) seems like images are not imported why might it be? I did not ask it to --skip

The main difference I see is for local one, I used wp core install etc to install the WP. For the server one the install is already done by LightSail/Bitnami. Does this make a difference? I do not expect it to?

wp import something.xml --authors=mapping.csv --path=./

When I tried on localhost, it appears media files are imported. When I tried on real server (AWS LightSail) seems like images are not imported why might it be? I did not ask it to --skip

The main difference I see is for local one, I used wp core install etc to install the WP. For the server one the install is already done by LightSail/Bitnami. Does this make a difference? I do not expect it to?

wp import something.xml --authors=mapping.csv --path=./

Share Improve this question edited Jan 17, 2017 at 11:12 Jiew Meng asked Jan 17, 2017 at 6:45 Jiew MengJiew Meng 1,9115 gold badges24 silver badges40 bronze badges 10
  • Is it possible to upload media through wordpress dashboard on this remote server? What is the message from wp cli when you try to import? – Mateusz Marchel Commented Jan 17, 2017 at 9:49
  • What is the exact line you run? – prosti Commented Jan 17, 2017 at 10:05
  • @prosti updated post – Jiew Meng Commented Jan 17, 2017 at 11:12
  • @MateuszMarchel, at the end a success message Success: Finished importing from 'something.xml' file. so its OK? Posts are imported just that images are still linked to old site – Jiew Meng Commented Jan 17, 2017 at 11:14
  • Ok, so if I understand correctly: You have exported wordpress posts and now you want to import this via wp-cli but links to images have wrong urls? Is it correct? At first I understand that you have problem with media importing (wp media import). – Mateusz Marchel Commented Jan 17, 2017 at 12:40
 |  Show 5 more comments

1 Answer 1

Reset to default 1

wp import something.xml

The possible problem with this solution is when the original domain is not available from the web server you are on. Try to ping the domain name from the AWS LightSail.

You know for the wpcom-themes.svn.automattic/demo/theme-unit-test-data.xm‌l, there you have images like wpthemetestdata.files.wordpress/2010/08/manhattansummer.‌​jpg, but when the domain wpthemetestdata.files.wordpress is not available anymore the whole thing with resources will not work.


Also do you get some feedback of success / failure like this

# Import content from a WXR file
$ wp import example.wordpress.2016-06-21.xml --authors=create
Starting the import process...
Processing post #1 ("Hello world!") (post_type: post)
-- 1 of 1
-- Tue, 21 Jun 2016 05:31:12 +0000
-- Imported post as post_id #1
Success: Finished importing from 'example.wordpress.2016-06-21.xml' file.

Finally if you try to wget some image from your origianal website what you will get?

Something like this but on your domain.

 wget wpthemetestdata.files.wordpress/2010/08/manhattansummer.‌​jpg

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745480673a4629541.html

相关推荐

  • import - WP CLI not importing media files

    When I tried on localhost, it appears media files are imported. When I tried on real server (AWS LightSail) seems like i

    2小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信