WordPress.org

Ready to get started?Download WordPress

Forums

Export function produces 0-byte file (8 posts)

  1. undenkbar
    Member
    Posted 4 years ago #

    When attempting to export the content of my blog, the export function seems to be doing something for about 20 seconds and then delivers an empty export file: 0-bytes. There are no error messages, I would expect the filesize to be around 25MB. I suspect that something times out the export, closes the file before writing it and delivers the empty shell. Anyone know this problem? Thx.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    PHP has an inherent timeout limit on run time. The export naturally needs a lot of time to pull all the data out of the database.

    Look into increasing the max_execution_time setting on your PHP installation.

  3. undenkbar
    Member
    Posted 4 years ago #

    Thanks. That would be the .htaccess?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Depends on your host. There's no way for me to tell you how to change that value.

  5. aaron1728
    Member
    Posted 4 years ago #

    I've got ~2500 posts. Below are lines from my php.ini file. What would be reasonable settings to change these to?

    max_execution_time = 30 ; Maximum execution time of each script, in seconds
    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 32M ; Maximum amount of memory a script may consume (32MB)

    ===

    I raised these to

    max_execution_time = 300 ; Maximum execution time of each script, in seconds
    max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 96M ; Maximum amount of memory a script may consume (32MB)

    and am still getting the 0-byte xml file.

  6. aaron1728
    Member
    Posted 4 years ago #

    I then raised these (per BlueHost tech support) to

    max_execution_time = 1000 ; Maximum execution time of each script, in seconds
    max_input_time = 1000 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 1000M ; Maximum amount of memory a script may consume (32MB)

    and am still getting the 0-byte xml file.

    Even tried with a single author who had fewer than 40 posts and still getting 0-byte file.

  7. bh_WP_fan
    Member
    Posted 4 years ago #

    The php.ini file is not recursive and will likely not be affecting your settings in directories deeper down. Setting the mode to PHP5 (Single php.ini) through the PHP Config icon in the cPanel may help. You can also do the following which should most definitely work for you.

    Have bluehost enable shell access for you, then login through ssh and run the following:

    mysqldump -u dbprefix_username -p dbprefix_database > dbbackup.sql

    Replace dbprefix_username with the actual username for your database and replace dbprefix_database with your actual database name. Keep your wp-config.php file open in another window so you can enter the database password when it prompts you for it.

    Using this method will not run into any timeout problems.

    Repair and optimize your databases before doing the export just in case some corruption is interfering with it:
    http://helpdesk.bluehost.com/index.php/kb/article/000496

  8. Rich Owings
    Member
    Posted 4 years ago #

    I am having this problem too. I was hoping that moving to 2.9.1 would fix it, but it did not. What's weird is after I updated my testing subdomain (a duplicate of my main site), XML export works on that installation.

Topic Closed

This topic has been closed to new replies.

About this Topic