In the past I've used mysqldump files, rsync, and MySQL search and replace to migrate a WordPress site from one server and domain to another. This has worked fine, but now I'm attempting to migrate a individual WP site to a WP Network, and the uploads directory on this individual site is actually symlinked to from a few different sites, so it consists of a hodgepodge of different files. Because of this, I need something that will pick out the files I need and transfer them to my WP Network.
I could write a script to go through these sites and pick out attachments and path GUIDs, copy stuff over that way, but I've also looked at using the WordPress Importer/Exporter plugin. I like how it simplifies this process and reduces my workload considerably with not only the attachments but setting WordPress options, but I'm finding that this plugin doesn't work consistently well.
Specifically, I've had timeout issues where all of the attachments would not download within my PHP CGI timeout value. Even when I increase this timeout value to a very high number, it just doesn't seem to work well unless I break up the XML file into 1 MB chunks. When I do this I can get the job to finish, but I've noticed that the image URLs in the post_content field are not replaced with their new WP Network URLs.
I can live with the non-updated post_content field URLs, I can correct this on my own, but I'm kind of uncomfortable with these timeouts, silent failures, and having to coddle this along to make it work properly. I'd much rather run the job on the command line where I don't have to deal with timeout issues, and where I can see verbose output to know exactly what it is doing.
Has anybody concocted a command line import script that reads these WordPress XML files and does what the WordPress import GUI job does?
I'm leaning towards doing the import without the attachments, and then making my own to bring over the attachments via a command line script. Any other ideas or stuff I should look at?