8

I have a site being developed locally and I want to import the contents to an online installation. I used wordpress "import" but it cant get the media files. Is there any "wordpress" was of doing this or will I have to get access to my LDE from outside or upload the entire installation which I would rather avoid?

1 Answer 1

22

When I use WordPress Import in this cases, this is what I do:

  • Export the XML in localhost.

  • Open the exported file in a text editor.

  • Search and replace http://localhost/wp-content/uploads/ for http://example.com/custom-temporary-folder/.

  • Upload the uploads folder via FTP to the custom-temporary-folder.

  • Perform the Import in example.com using the modified XML file.

5
  • 1
    very clever ... will give it a go. Commented Feb 18, 2013 at 18:20
  • 2
    ... worked perfect ... great technique! Commented Feb 18, 2013 at 18:38
  • Do you need to tick the checkbox "Download and import image attachments"? Commented Aug 29, 2019 at 9:20
  • I did it by ticking the checbox. Media got imported. But I am not sure what it does :) Commented May 16, 2020 at 20:00
  • 1
    Wow. I'm really glad to have stumbled across this answer. I thought I had it cracked by finding and replacing all the URLs for those in the uploads directory on the new server but I guess the import process doesn't like them being in there already. Adding to temp folder worked like a charm. Commented Oct 7, 2020 at 21:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.