• Rob

    (@geraldcash)


    I did a search but there doesn’t seem to be a clear answer to this question.

    Basically i’ve got a 44mb xml file, the rest of the site is lost, so no chance of getting a dump from phpmyadmin and moving that across, so really this xml file is the sole surviving part of the site.

    However i’m told that I can only upload 2m’s in the WP admin and when I try to upload the 44mb file it obviously comes up with an error (as one would expect).

    Is it just a case of opening this up in notepad and chopping it into 22 different smaller files? Surely there must be an easier way of doing this, maybe even someones created a little script/program for slizing up your file for you?

    Any help would be greatly appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Rob

    (@geraldcash)

    Not meaning to spam but… *bump*

    This is a good question because for many of us who have been using WP for years, this is a common problem. To guard against a catastrophic problem, I am trying to set up a mirror on my site and have the same issue. I don’t have access to my php.ini file but at one point I did and changing the size didn’t work. There must be some way to easily import the XML file from elsewhere on the server. I know I can upload it via FTP, but through the WP admin, it won’t work.

    So, how can we get XML files with a decent size to be imported to get around certain size changes? We shouldn’t have to go running to our host every time we need to import something.

    My plan is to import that XML once a week (or more, if possible). But as the weeks and months go on, my 19mb XML file will only get bigger and Gerald’s suggestion of slicing it up into little pieces would just take too damn long. :\

    Perhaps an app that can split XML files into smaller chunks, while maintaining certain required structural tags for all segments? Then import the smaller size XML files individually.

    Actually, I stand corrected–it’s actually pretty easy to import everything as a raw SQL file then, in phpMyAdmin, go into wp-options and change all of the mentions of the old server to the new one. I was actually shocked at how much of a breeze it was. Still, an automatic way to do this would be a great thing.

    Great idea ??

    Put this in you’re .htaccess file, and youre problem is solved ??

    <IfModule mod_rewrite.c>
    RewriteEngine On
    php_value memory_limit 48M
    php_value upload_max_filesize 16M
    php_value post_max_size 16M
    </IfModule>

    Suc6!

    You can change the php_value upload_max_filesize in to any other value you need, so in this case i whould put it on 45M …

    i have the same problem but with a 22mb file. i have been searching now for 3 days for a good sulotion but cant figure it out how to split a XML file. Can anyone help me? or even better, can YOU edit the xml file for me (since i dont know anything about xml and html)
    the max size for the xml file must be 7mb and i also put this in the htaccess file without any results:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    php_value memory_limit 30M
    php_value upload_max_filesize 30M
    php_value post_max_size 30M
    </IfModule>

    I actually Managed to get my XML file down from 13 Mb to 300-odd Kb by going in and deleting all the comments marked as spam from the wp_comments table!

    Backup your database, then run this inside the SQL window in phpmyadmin:
    DELETE FROM wp_comments WHERE comment_approved = 'spam'

    After that, worked a treat for me! ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Import 44mb xml file’ is closed to new replies.