I found the WordPress Importer plugin is good for importing posts and comments, but is lacking when it comes to importing large attachments (like images) from large sites.
My import would often time out and crash.
I wrote this plugin to help with my own blog migrations, but I hope you find it useful too.
- As a prerequisite, import your WXR file using the WordPress importer, but do not select the option to Download and Import Attachments.
- 作为先决条件,请使用WordPress导入程序导入WXR文件,但不要选择“下载和导入附件”选项。
I have found that an import file up to 15MB big will work as long as you don’t import attachments.
我发现只要您不导入附件,最大可以导入15MB的导入文件。 li>
- Navigate to the Attachment Importer screen.
- 导航到“附件导入器”屏幕。 li>
- Select your WXR export file.
- 选择您的WXR导出文件。 li>
- Select the user you would like to be the owner of the downloaded images.
- 选择要成为下载图像所有者的用户。
Default: current user.
默认值:当前用户。 li>
- Sit back and let the importer run.
- 坐下来,让导入程序运行。
The process can take as little as 10 seconds for 10 images, or about two hours for 2000 images.
对于10张图像,此过程可能仅需10秒,而对于2000张图像,此过程可能需要约2个小时。
These times depend on the server that hosts your WordPress site.
这些时间取决于托管WordPress网站的服务器。 li>
- If you receive any errors during the process, try running the file again after it finishes.
- 如果在此过程中收到任何错误,请在文件完成后尝试再次运行。
The plugin is programmed to ignore files that match the following criteria:
该插件被编程为忽略符合以下条件的文件:
- Same name
- 同名 li>
- Same file name
- 相同的文件名 li>
- Same upload date
- 相同的上传日期 li>
- Same file size
- 相同的文件大小 li>
ul>
li>
ol>
How it works.
工作原理。 h4>
This plugin uses FileReader and to parse the XML file
此插件使用 FileReader 并解析XML文件
in the browser, then uses ajax to request WordPress perform individual uploads.
在浏览器中,然后使用ajax请求WordPress执行单个上传。 p>
License
许可证 h4>
Attachment Importer – A plugin for WordPress to import attachments from another blog using a WXR file.
附件导入器– WordPress插件,可使用WXR文件从另一个博客导入附件。
Copyright (C) 2014 Toasted Lime
版权所有(C)2014烤石灰 p>
This program is free software;
该程序是免费软件;
you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
您可以根据自由软件基金会发布的GNU通用公共许可证的条款重新分发和/或修改它;
either version 2 of the License, or (at your option) any later version.
许可的版本2,或(由您选择)任何更高的版本。 p>
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
分发该程序的目的是希望它会有用,但没有任何担保;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
甚至没有对适销性或特定用途适用性的暗示保证。
See the GNU General Public License for more details.
有关更多详细信息,请参见GNU通用公共许可证。 p>
You should have received a copy of the GNU General Public License along with this program;
您应该已经与该程序一起收到了GNU通用公共许可证的副本;
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
如果没有,请写信给美国自由软件基金会有限公司(Free Software Foundation,Inc.),美国马萨诸塞州波士顿市第五楼富兰克林街51号,邮政编码02110-1301。
The license and copyright applies to all resources bundled with this plugin, except as noted below:
许可和版权适用于与此插件捆绑在一起的所有资源,除非另有说明: p>
Portions of this plugin use code from:
此插件的部分使用以下代码: p>