{"id":12477621,"date":"2020-02-25T12:50:49","date_gmt":"2020-02-25T12:50:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/import-xml-5\/"},"modified":"2020-02-25T13:05:31","modified_gmt":"2020-02-25T13:05:31","slug":"import-xml-5","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/import-xml-5\/","title":{"rendered":"Import XML"},"content":{"rendered":"<p>Thx for plugin! it save much time with media uploading.<br \/>\nBut I have some specific problem. I need ipmort 10000+ images. And when I want to register them I have 500 timeout error. I played with Limit number of search files, Search method of files and also with max_execution_time on php.ini. Nothing can&#8217;t help solve my problem. And i decided to import my files with plugin. But I haven&#8217;t thumbnail images on server. Just full images. I want create it with this plugin. And when I import xml with <code>_wp_attachment_metadata<\/code> it display error no file. So I think that import function can&#8217;t create thumbnails. At first I should upload thumbnail. Am I right?<\/p>\n<p>Not about this question. But about import. When import xml I have 0% progress. When I debug import function I see that data of $item with \\n and \\t. Code where I find it <code>foreach ( $xml-&gt;channel-&gt;item as $item )<\/code>. I solve it with replace.<br \/>\nAnd function unserialize not work with my exported data. I solve it with:<\/p>\n<pre><code>$fixed_data = preg_replace_callback ( &#039;!s:(\\d+):&quot;(.*?)&quot;;!&#039;, function($match) {      \n\treturn ($match[1] == strlen($match[2])) ? $match[0] : &#039;s:&#039; . strlen($match[2]) . &#039;:&quot;&#039; . $match[2] . &#039;&quot;;&#039;;\n}, $value[&#039;postmeta_wp_attachment_metadata_value&#039;] );<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-12477621","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12477621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12477621\/revisions"}],"predecessor-version":[{"id":12477627,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12477621\/revisions\/12477627"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12477621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}