Make WordPress Core

Opened 17 years ago

Closed 9 years ago

#3632 closed enhancement (wontfix)

Export gzip support

Reported by: pozhonks's profile PozHonks Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Import Keywords:
Focuses: 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 (2)

gzip-export.diff (1.9 KB) - added by DerFichtl 16 years ago.
gzip export feature
3632.diff (2.7 KB) - added by solarissmoke 13 years ago.

Download all attachments as: .zip

Change History (28)

#1 @PozHonks
17 years ago

  • 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.

#2 @Viper007Bond
17 years ago

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

#3 @Viper007Bond
17 years ago

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

#4 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.4

#5 @scoop0901
17 years ago

  • Priority changed from low to high
  • Severity changed from minor to major
  • Type changed from enhancement to defect

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.

#6 follow-up: @Otto42
17 years ago

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.

#7 in reply to: ↑ 6 @Otto42
17 years ago

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.

#8 @Otto42
17 years ago

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.

#9 @ShahabJafri
17 years ago

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 ..

@DerFichtl
16 years ago

gzip export feature

#10 @DerFichtl
16 years ago

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

#11 @DerFichtl
16 years ago

  • Keywords has-patch needs-testing added

#12 @lloydbudd
16 years ago

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

Duplicate #5485

#13 @westi
16 years ago

  • Milestone changed from 2.5 to 2.6

2.5 is Feature Frozen - Push to 2.6

#14 @jacobsantos
16 years ago

  • Type changed from defect to enhancement

#15 @FFEMTcJ
15 years ago

Also see #6467 which suggests another way to do this.

#16 @Denis-de-Bernardy
15 years ago

Imo, it's a better idea to tell the user to upload the file into the site's home dir, and to proceed with the import from there.

#17 @Denis-de-Bernardy
15 years ago

  • Keywords changed from has-patch, needs-testing to has-patch needs-testing

#18 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Milestone changed from 2.9 to Future Release

broken patch

#19 @Denis-de-Bernardy
15 years ago

  • Component changed from Administration to Import
  • Priority changed from high to normal
  • Severity changed from major to normal

@solarissmoke
13 years ago

#20 @solarissmoke
13 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Added a patch to allow gzip exporting. This works for me but will need testing across platforms because output buffering always seems a bit wobbly.

#21 follow-up: @nacin
13 years ago

Should probably follow what we've done in load-scripts.php and load-styles.php. Also need to make sure the importer can accept this.

For what it's worth, not convinced on this, I'm only talking from a technical perspective. I would rather offer better chunking or a better bridge between installs, perhaps as a wordpress.org service.

#22 in reply to: ↑ 21 @solarissmoke
13 years ago

  • Keywords 2nd-opinion added; has-patch needs-testing removed

Replying to nacin:

Should probably follow what we've done in load-scripts.php and load-styles.php. Also need to make sure the importer can accept this.

Okay - that looks more robust. Maybe I'll wait until there is sufficient agreement that this is worth pursuing in the first place.

#23 @chriscct7
9 years ago

  • Keywords 2nd-opinion removed
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5485.

#24 @chriscct7
9 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Whoops, that was already marked as a duplicate of this. Reopening

#25 follow-up: @ericlewis
9 years ago

Does anybody care about this? 4 years without a comment.

Last edited 9 years ago by ericlewis (previous) (diff)

#26 in reply to: ↑ 25 @DrewAPicture
9 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

Replying to ericlewis:

Does anybody care about this? 4 years without a comment.

Apparently not enough to pursue it. Closing as wontfix.

Note: See TracTickets for help on using tickets.