Importing content to WordPress from a Local installation.

To properly import media along with posts you need to do a work around with the import tool. WordPress out of the box expects that the media will be available on a live website and is unable to import from a local installation. This post gives the outline of what is needed:

https://wordpress.stackexchange.com/questions/87395/import-media-to-online-wordpress-from-local-development

More explicitly:

  • Use FTP to create a temporary, publicly accessible folder on your target site.
    • Upload the media from /wp-content/uploads/ on the source site to the temporary folder.
  • Create an export file from the source site using the tools > export in the admin.
    • In the export file that is generated do the find and replace of the uploads path to point to the temporary folder path.
  • Import the content to the target site using the tools > import in the admin.

Another issue I came across while trying to do the above was a 500 error during the attempted import. I resolved this by using the back button in the browser and running the import again.

I imagine there is a plugin that does this for you, but I was successful using the above method and wanted to note that process.

Scroll to Top