Automating import, overcomming 2MB limit

I'm exporting a home-made blog server with 3,400+ bloggers to WPMU and looking for a way to automate the procedure so my users don't have to export then import themselves.

Can anyone point me in the right direction? Someway to feed the WP import function and overcome the 2MB limit of the manual import?

Many thanks in advance :slight_smile:

  • rgrone
    • Flash Drive

    This one's one me it took me almost 6 hours to work around and not having to be messing with the Zend php/java bridge, this will handle a database of up to 500meg, it is currently set for 320megs with a ten minute timeout.

    Place in the wp-admin folder and leave the other .htaccess alone.

    Here you go:

    # BEGIN WordPress
    #Change upload limits
    php_value memory_limit 320M
    php_value post_max_size 320M
    php_value upload_max_filesize 320M
    php_value max_execution_time 6000
    #Change upload limits end
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

  • drmike
    • DEV MAN’s Mascot

    php_value memory_limit 320M

    I believe that would be a bad idea. I would have to check but I believe that total memory is allocated by the server whenever php is run.

    If you read Order of the Stick, it's like that time V. commented that it takes 7 pages out of his/her spell book for that 7th level Power Word spell when all it is is a single word.

    And 10 minutes of searching finds it:

  • hobbleknee
    • WPMU DEV Initiate

    Wow everyone, thanks for all the tips and effort :slight_smile: Here's a little more about what I'm trying to do:

    I have 2 sites on the same physical machine. So far, I've made an exporter that makes WXR files from the old site (site 1) and saves them on the new WPMU site (site 2).

    Now I'd like to fix it so a user from site 1 can click a button which:
    1) creates a new account on site 2.
    2) calls WP's own import function directly (wp-admin\import\wordpress.php) and uses the local WXR file, instead of prompting the user to upload a file.

    Any ideas are greatly appreciated.

  • drmike
    • DEV MAN’s Mascot

    I'm torn on automated that as the first thing you learn when you get folks transferring sites over is they need to clear out any spam comments and trackbacks out of the queue. We've seen that queue add tens of megs to the file and makes it too large for php to handle. And a waste since they don't need to be in there.

    That and I'm not sure how to handle this right off the top of my head. Have to think about it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.