Ticket #3632 (new enhancement)

Opened 2 years ago

Last modified 2 months ago

Export gzip support

Reported by: PozHonks Assigned to: anonymous
Priority: high Milestone: 2.9
Component: Administration Version: 2.1
Severity: major Keywords: has-patch, needs-testing
Cc:

Description

The ticket may be similar to #3178, but it is not, because we control the WordPress process.

Importing a wordpress.xml file to another wordpress may fail due to an upload_max_filesize and post_max_size directives in php.ini. You know that many web hosts allow only an upload_max_filesize of 2 MB. Though, compression is a great help.

A simple solution is, on one side, offering an option to compress in GZ format the xml file when exporting, and, on the other side, the WordPress importer will accept the compressed file.

And, when possible, WordPress importer should accept compressed files from other formats and blogs.
Just say you only accept one compression format (gz, zip, etc) and the user will comply.

Attachments

gzip-export.diff (1.9 kB) - added by DerFichtl on 01/04/08 14:09:13.
gzip export feature

Change History

01/22/07 15:05:06 changed by PozHonks

  • type changed from defect to enhancement.

Or, if the compression method is not implemented, an alternative to the upload function would be to give the URL of the file.
So, we can upload by FTP the exported file somewhere, then give its URL, like with the RSS importer.

01/22/07 16:45:12 changed by Viper007Bond

Might also be worth removing line breaks and stuff. People probably don't need to be manually editing the file anyway.

01/22/07 16:45:27 changed by Viper007Bond

That is if they aren't already removed...

03/27/07 02:18:15 changed by foolswisdom

  • milestone changed from 2.2 to 2.4.

04/11/07 07:36:23 changed by scoop0901

  • priority changed from low to high.
  • type changed from enhancement to defect.
  • severity changed from minor to major.

For WP-to-WP imports, using a 5meg file WP2.12 exported, I cannot import the file into a new blog using WP2.13. This isn't only limited to "large" files. I checked with my Webhost and they said that uploading a 5meg file is an issue.

I get 'no' errors, though, when the process ends. I've bugged about the WP-to-WP error, and would really like to see this resolved -- but much soonere than the milestone shown below -- 2.4.

(follow-up: ↓ 7 ) 04/11/07 17:22:00 changed by Otto42

Could we add support for gzipped output and input files? *.xml.gz, basically? Given that it's XML/Text, it compresses really well, and this might solve the huge file problem for the short term.

(in reply to: ↑ 6 ) 04/11/07 17:22:55 changed by Otto42

Replying to Otto42:

Could we add support for gzipped output and input files? *.xml.gz, basically? Given that it's XML/Text, it compresses really well, and this might solve the huge file problem for the short term.

Never mind. Already suggested. Shows what I get for not reading the complete ticket.

04/11/07 17:39:34 changed by Otto42

Changing this:

$importdata = file($this->file); // Read the file into an array

to this:

if ( extension_loaded('zlib') && substr($this->file, -3) == '.gz') {
	$importdata = gzfile($this->file); // Read the file into an array
} else {
	$importdata = file($this->file); // Read the file into an array
}

In the get_entries() function in wp-admin/import/wordpress.php should do the trick for importing gzip compressed files.

Sending back gzip compressed output is trickier. I don't think ob_gziphandler will work in export.php, because of the header thing. Worth a try though, maybe some testing is in order.

08/26/07 09:02:29 changed by ShahabJafri

If we could get an option whether to export Comments or Posts Meta (Like custom fields ), the size of exported file can be greatly reduced. I was having Kramer earlier (discontinued after upgrading from WordPress 1.5 though) and I found that Kramer created shitload of custom fields and expanded the database size .. I removed everthing related to Kramer from Post2meta and my xml size came down to 1.8 mb ..

01/04/08 14:09:13 changed by DerFichtl

  • attachment gzip-export.diff added.

gzip export feature

01/04/08 14:13:02 changed by DerFichtl

i have added a checkbox to the export screen and the logic for gzip compress via ob_gzstart callback. maybe it helps. see attachement gzip-export.diff

01/04/08 15:03:42 changed by DerFichtl

  • keywords set to has-patch, needs-testing.

01/04/08 23:27:29 changed by lloydbudd

  • summary changed from WordPress to WordPress import fails with big files to Export gzip support.

Duplicate #5485

02/27/08 22:05:40 changed by westi

  • milestone changed from 2.5 to 2.6.

2.5 is Feature Frozen - Push to 2.6

09/16/08 21:32:04 changed by jacobsantos

  • type changed from defect to enhancement.