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
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/forhttp://example.com/custom-temporary-folder/.Upload the
uploadsfolder via FTP to thecustom-temporary-folder.Perform the Import in
example.comusing the modified XML file.
- 1very clever ... will give it a go.byronyasgur– byronyasgur2013-02-18 18:20:13 +00:00Commented Feb 18, 2013 at 18:20
- 2... worked perfect ... great technique!byronyasgur– byronyasgur2013-02-18 18:38:18 +00:00Commented Feb 18, 2013 at 18:38
- Do you need to tick the checkbox "Download and import image attachments"?Flimm– Flimm2019-08-29 09:20:26 +00:00Commented Aug 29, 2019 at 9:20
- I did it by ticking the checbox. Media got imported. But I am not sure what it does :)Jags– Jags2020-05-16 20:00:37 +00:00Commented May 16, 2020 at 20:00
- 1Wow. 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.Kevin Nugent– Kevin Nugent2020-10-07 21:25:46 +00:00Commented Oct 7, 2020 at 21:25