Title: [Plugin: WordPress Importer] wordpress importer problem: all posts&#039; author become admin
Last modified: August 20, 2016

---

# [Plugin: WordPress Importer] wordpress importer problem: all posts' author become admin

 *  [pcha0536](https://wordpress.org/support/users/pcha0536/)
 * (@pcha0536)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/)
 * Hi all,
 * I got problem for wordpress migration by using wordpress importer.
 * Problem: **all posts are assigned to the admin.**
 * I got the following message while I am importing all contents.
    _Failed to create
   new user for XXX. asign to the current user_
 * My old blogs are wordpress 2.9 updated to wordpress 3.1.4, then to wordpress 
   3.2.1. Currently it works fine with no big issues.
 * However, I create the brend-new empty wordpress 3.2.1 site. Only user in the 
   site is admin, it should be able to create new users automatically, right ?
 * I tried to import to wordpress MU and wordpress single site, but I got the same
   problem for both. ALL POSTS assigned to the same author admin.
 * I am looking for the plugins or methods that I can migrate users with corresponding
   passwords and posts.
 * my company’s blogs got more than 800 posts, 6XX authors(many of them are spam),
   which is almost impossible for me to modify it author by author.
 * Please help me solve this problem.
 * [http://wordpress.org/extend/plugins/wordpress-importer/](http://wordpress.org/extend/plugins/wordpress-importer/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Jon Cave](https://wordpress.org/support/users/duck_/)
 * (@duck_)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278423)
 * Edit the wordpress-importer plugin on line 17. Change:
 * > define( ‘IMPORT_DEBUG’, false );
 * to
 * > define( ‘IMPORT_DEBUG’, true );
 * After doing that try importing again. This will cause more information to be 
   displayed to help track down the problem.
 * Also, if you have any other plugins enabled then try disabling them before importing.
 *  Thread Starter [pcha0536](https://wordpress.org/support/users/pcha0536/)
 * (@pcha0536)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278488)
 * Hi Jon Cave,
    Thanks for replying me.
 * However, it still doesn’t work. Some of the posts can be imported correctly, 
   but most of the posts are assigned to admin…
 * and the user cannot be import/create properly.
    - not all of the users imported.
    - their roles mis-match, for example, administrator become subscriber.
 * I would like to know what the problem is. any article or posts that relate to
   importing posts and users ?
 *  [Jon Cave](https://wordpress.org/support/users/duck_/)
 * (@duck_)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278499)
 * As above. Could you make the change to the IMPORT_DEBUG line in the plugin’s 
   main php file. Then try importing again and paste the exact error message that
   appears this time. Changing the IMPORT_DEBUG definition will output more information
   about why the user couldn’t be created so I can help you solve this issue.
 *  Thread Starter [pcha0536](https://wordpress.org/support/users/pcha0536/)
 * (@pcha0536)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278519)
 * Hi Jon Cave,
    I made the change on define( ‘IMPORT_DEBUG’, true );. and there
   are two situation.
 * **uncheck Download and import file attachments**, it go to the loading page. 
   This load the posts properly with correct authors, but import users cannot login(
   password error). and their roles become subscriber.
 * **check Download and import file attachments**, first, it hang on blank page 
   while loading.alothugh the users are imported, the posts are not .Then I have
   to re-import several times to load all post (to reach have fun) .
 * Secondly, I got the following notice:
 * > Failed to create new user for admin. Their posts will be attributed to the 
   > current user. This username is already registered.
   >  Failed to create new user
   > for Fred. Their posts will be attributed to the current user. This username
   > is already registered. Failed to create new user for Lucy Wire. Their posts
   > will be attributed to the current user. This username is already registered.
   > Failed to create new user for Tristan Ap. Their posts will be attributed to
   > the current user. This username is already registered. …
 * P.S. sometimes I got the following message
    ** The server is temporarily unable
   to service your request due to maintenance downtime or capacity problems. Please
   try again later.**. I import to my local zend server virtual host
 * Thirdly, once all posts imported, not all posts assigned to the right authors.
 * In conclusion, if I uncheck Download and import file attachments, the post import
   correctly. But the links won’t update to the new site and the media files are
   not downloaded to my localhost.
 * If I download and import file attachments, cannot assign the author to their 
   corresponding post.
 *  Thread Starter [pcha0536](https://wordpress.org/support/users/pcha0536/)
 * (@pcha0536)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278521)
 * I am trying to use another method mentioned in the following blog.
    [http://welcome.totheinter.net/2008/10/04/how-to-migrate-from-wordpress-to-wordpress-mu/](http://welcome.totheinter.net/2008/10/04/how-to-migrate-from-wordpress-to-wordpress-mu/)
 * It seems work and I think maybe I can migrate the users with this method.
 * The problem is for the multisite user roles on different blogs. is wp_usermeta
   table control the user roles and level while they login ?
 *  [Jon Cave](https://wordpress.org/support/users/duck_/)
 * (@duck_)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278531)
 * > uncheck Download and import file attachments, it go to the loading page. This
   > load the posts properly with correct authors, but import users cannot login(
   > password error). and their roles become subscriber.
 * This is expected. The export files do not contain the users’ passwords or role.
   The importer warns you of this at the second step: “If a new user is created 
   by WordPress, a new password will be randomly generated and the new user’s role
   will be set as subscriber. Manually changing the new user’s details will be necessary.”
 * > Failed to create new user for admin. Their posts will be attributed to the 
   > current user. This username is already registered.
 * Well it sounds like you import several times. So when you run the import the 
   2nd, 3rd, … times you should use the dropdown on the Assign Authors screen, labelled“
   or assign posts to an existing user:”, to map the authors correctly. E.g. for
   the admin user choose “admin” from the dropdown.
 *  Thread Starter [pcha0536](https://wordpress.org/support/users/pcha0536/)
 * (@pcha0536)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278532)
 * Hi Jon Cave,
    thanks for replying me. Now I understand the problem might be I
   click submit import several times, due to the page always hang on blank page.
   Or stop loading and never reach the “have fun” step.
 * well, seems it is difficult for me because my current sites got more than 100
   authors… I feel I cannot do it one by one.
 * AND I always got blank page or stop load while import (**is that caused by php
   loading timeout ?**) . Some posts set it caused by php.ini max_execution_time,
   max_input_time, memory_limit, and ..etc. However, no matter what value I change,
   I cannot get rid of this problem.
 * I know there is another plugin called: **Advanced Export for WordPress & WordPress
   MU** [http://wpmututorials.com/plugins/advanced-export/](http://wpmututorials.com/plugins/advanced-export/)
 * It can import posts with correct author, but it may not check whether the media
   files existing or not. I feel it will keep adding media files **in background
   processing**, even you close the browser. (ex: the uploads directory 5XX MB, 
   after import I got more than 1 GB.)
 * I was thinking: (just assumption)
    1) import document and attachemnt. to get 
   all media files. 2) delete database and reset to default wordpress. 3) import
   without doucment and attachement. 4) modify and update the internal post links.(
   modify db table) 5) export/import user and usermeta from current sites. then 
   modify db table.
 *  [crifan](https://wordpress.org/support/users/crifan/)
 * (@crifan)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278601)
 * have fixed it.
    root cause is username in WXR file (value of <wp:author_login
   > in WXR) MUST NOT contains non-(alphanumeric character and the underscore), 
   such as @, -, …, all are invalid, if contain any of them, then will got error
   of “Failed to create new user for”
 *  for details please goto:
    【已解决】使用wordpress importer导入WXR时出错：Failed
   to create new user for XXX. asign to the current user [http://www.crifan.com/2012/03/26/wordpress_importer_failed_to_create_new_user_for_asign_to_the_current_user/](http://www.crifan.com/2012/03/26/wordpress_importer_failed_to_create_new_user_for_asign_to_the_current_user/)
 * also seems to found bug for if username contains underscore, then after imported
   original usename will be omitted, the post’s username will be assigned to admin’s
   name.
    such as mine ‘green_waste’, after import, post’s username will become 
   to crifan(admin name), not the expected ‘green_waste’. more info can found at:【
   记录】发现一个wordpress importer的bug：如果WXR中的用户名包括下划线，则虽然导入
   的时候，可以正确检测出用户名，但是导入之后，帖子的用户就自动变为默认的管理员的
   用户名，而不是所期望的用户名 [http://www.crifan.com/2012/03/26/wordpress_importer_bug_change_post_username_to_admin_if_username_contain_underscore_in_wxr/](http://www.crifan.com/2012/03/26/wordpress_importer_bug_change_post_username_to_admin_if_username_contain_underscore_in_wxr/)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: WordPress Importer] wordpress importer problem: all posts' author
become admin’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-importer/assets/icon.svg?rev=2791650)
 * [WordPress Importer](https://wordpress.org/plugins/wordpress-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-importer/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [crifan](https://wordpress.org/support/users/crifan/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpress-importer-wordpress-importer-problem-all-posts-author-become-admin/#post-2278601)
 * Status: not resolved