• Hello,

    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?

Viewing 12 replies - 1 through 12 (of 12 total)
  • I use FTP to upload site files and the import export functionality of phpMyAdmin to do this…if done right works each time.

    Thread Starter besson3c

    (@besson3c)

    I’m using Git for deployment of files, so I have no problems there. If I could get the import/export working consistently I’d be happy.

    Has the import/export been fully tested in PHP CGI environments where there are a lot of attachments to download?

    Try a test setup using my suggestion.

    Thread Starter besson3c

    (@besson3c)

    That is the same as doing a mysqldump, I know how to do that (thanks for the suggestion though, I appreciate it). My main problem is with handling the upload attachments. The import will also set the new path names and whatever other options for the WP Network, but I can live without this. My main focus is with bringing over the attachments given my setup described in my first post.

    That is the same as doing a mysqldump

    I strongly disagree.

    Thread Starter besson3c

    (@besson3c)

    It’s actually inferior, because last I checked you can’t set a default character set using phpMyAdmin.

    Anyway, the issue is not central to my main question…

    Yes you can.

    Thread Starter besson3c

    (@besson3c)

    Really? Where is that option? PMA config file?

    config.inc.php

    Thread Starter besson3c

    (@besson3c)

    Cool, that’s good to know. I usually just use mysqldump because I find it faster, but some of my users in the past have used PMA.

    If you dump all the tables and try to import you will have issues, follow what WordPress advises here, clearly you know how to search?

    Thread Starter besson3c

    (@besson3c)

    mysqldump has the ability to create insert statements only without creating the database and possibly modifying the schema. WordPress probably recommends using PMA because it is easier to not obliterate the WordPress DB schema.

    At any rate, like I said, whether I dump or PMA export, my problem is *not* with getting the data into WordPress. I’ve been doing that for years, I’m cool with that.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WordPress Importer problems, alternatives’ is closed to new replies.