Opened 17 years ago
Closed 9 years ago
#3632 closed enhancement (wontfix)
Export gzip support
Reported by: | 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)
Change History (28)
#2
@
17 years ago
Might also be worth removing line breaks and stuff. People probably don't need to be manually editing the file anyway.
#5
@
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:
↓ 7
@
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
@
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
@
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
@
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 ..
#10
@
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
#12
@
16 years ago
- Summary changed from WordPress to WordPress import fails with big files to Export gzip support
Duplicate #5485
#16
@
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.
#18
@
15 years ago
- Keywords needs-patch added; has-patch needs-testing removed
- Milestone changed from 2.9 to Future Release
broken patch
#19
@
15 years ago
- Component changed from Administration to Import
- Priority changed from high to normal
- Severity changed from major to normal
#20
@
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:
↓ 22
@
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
@
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
@
9 years ago
- Keywords 2nd-opinion removed
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #5485.
#24
@
9 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
Whoops, that was already marked as a duplicate of this. Reopening
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.