WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] increasing import size limit past 2mb (18 posts)

  1. tentantoes
    Member
    Posted 5 years ago #

    I'm trying to load my XML file from a free wordpress hosted blog to a site that I'm now hosting. When I downloaded exported the file from the free WP blog, it was in XML but I notice when I try to import it to my new blog it's saying the WordPress file should be WXR? Perhaps that's not a major deal. The real question I'm having is about the error message I'm getting -

    "The uploaded file exceeds the upload_max_filesize directive in php.ini"

    I was able to find php.ini in my host and change the max size to 50mb, but that didn't fix the problem. I'm guessing I also have to change the max size somewhere in my wordpress files as well but I haven't been able to find where yet. Any pointers? Thanks for your help.

  2. MichaelH
    Member
    Posted 5 years ago #

  3. tentantoes
    Member
    Posted 5 years ago #

    I've followed the instructions given in the link included in the thread you gave me. I added that line of code - ini_set('memory_limit','24M'); - in the 2 locations that were instructed. I also changed in php.ini the filesize and post limit to 24M, but still nothing. I chose 24 because on the link given in the thread you suggested, it mentioned increasing in increments of 4, and I didn't know if that had anything to do with it so that's why I just chose 24. My WP import page still says the limit is 2M.

  4. MichaelH
    Member
    Posted 5 years ago #

    Might talk to your host then to see if they will increase the limit or break your import file into smaller files (must maintain the beginning/ending tags correctly).

  5. tentantoes
    Member
    Posted 5 years ago #

    How do I break the XML file up to smaller pieces?

  6. MichaelH
    Member
    Posted 5 years ago #

    Use a file editor to do that. Make sure you keep the proper begin/end tag structure.

  7. tentantoes
    Member
    Posted 5 years ago #

    Thanks for all your help. Got any pointers as to where I can look to read up on that begin/end tag structure? I opened the file in my Mac's TextEdit but wasn't really sure what tags to place as I break it up.

  8. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Many ways to increase the memory limit see here.

    If you still can't upload via wp-config.php change above nor change in max_file_upload with webhost (because those are easier), to break up XML in smaller pieces MANUALLY, you need the ff. in each XML file,
    a. always have the header

    <rss version="2.0"
    	xmlns:content="http://purl.org/rss/1.0/modules/content/"
    	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    	xmlns:dc="http://purl.org/dc/elements/1.1/"
    	xmlns:wp="http://wordpress.org/export/1.0/"
    >
    <channel>
    including all info like category, tags, etc to just before the first  <item>

    b. always have the footer

    </channel>
    </rss>

    c. In between, add the posts start with <item> end with </item> and check to see whether the XML file you're creating is less than or equal to 2MB. You'll get the hang of it.

    As always, before importing the new XML's, backup the database of the blog you are importing the XML files to and might as well export XML file of that blog as well for good measure.

  9. tentantoes
    Member
    Posted 5 years ago #

    I got the file broken down into pieces and imported them, mapped to an existing user, clicked submit and it said I was all done....but there's nothing there!

  10. Samuel B
    moderator
    Posted 5 years ago #

    clear browser cache and site cookies
    try resetting permalinks

  11. MichaelH
    Member
    Posted 5 years ago #

  12. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Thank you MichaelH. Cheers ;-)

  13. tentantoes
    Member
    Posted 5 years ago #

    I was able to call Bluehost and they changed the size limit for me. He told me I was in the right place and changed it properly, but there was one thing I missed. I didn't quite understand what that one thing was though. Anyway, I imported the file and my archives from my old blog are there, everything except for the last 2 years! I've got '04-'06 but am missing '07-'08! Any thoughts? Thanks for all your help!

  14. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    Check your original XML file exported from WordPress.com and see if your posts from the last 2 years are there.
    1. If all posts are there,
    a) re-import XML original uncut file - - sometimes it takes more than one or two import runs before all posts are imported.
    b) import cut XML files you already made per your above post which cover the last two years.
    2. If posts are missing - re-export from WordPress.com and then re-import XML file

  15. tentantoes
    Member
    Posted 5 years ago #

    I imported a fresh file several more times and it's all there! Thanks so much for all your help!

  16. worldview
    Member
    Posted 5 years ago #

    So by importing a large file over and over again all posts will eventually be imported?

    Is this what I am being led to believe?

    I had a 14MB file and it was also originally uploading all but most recent two years.

    It would be easier if one could select the segments by date (year) to export and import individually in sequence.

    Any chance?

  17. tentantoes
    Member
    Posted 5 years ago #

    That's what I did, I just imported it numerous times and each time there were more than the last. Breaking it up didn't work out for me, but it was the first time I'd ever tried anything like that and so I'm sure it was my fault. Try to import it several more times and see if you get more.

  18. aequalsb
    Member
    Posted 4 years ago #

    anytime you make changes to php.ini you MUST restart (or have the server restarted for you) for the changes to take effect

Topic Closed

This topic has been closed to new replies.

About this Topic