最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

database - Import users from old WP site to new one

programmeradmin0浏览0评论

I want to import existing users with their passwords from an old WordPress site to a new one. The new WordPress installation has also existing users. Therefore I couldn't simply export/import the database tables from the old site.

Is there any other way to import the old users with passwords to the new site?

I want to import existing users with their passwords from an old WordPress site to a new one. The new WordPress installation has also existing users. Therefore I couldn't simply export/import the database tables from the old site.

Is there any other way to import the old users with passwords to the new site?

Share Improve this question asked Sep 20, 2017 at 11:52 CrayCray 1452 silver badges11 bronze badges 6
  • As long as you turn off the "create tables" option you can indeed export and import, and this will preserve both your new-site users and your old-site users on the new site. I would first take a backup of both sites, just in case. – WebElaine Commented Sep 20, 2017 at 14:09
  • and what happens if they have the same id's? – Cray Commented Sep 20, 2017 at 14:09
  • I'd expect them to be skipped. You would need to manually change IDs. There may also be a plugin available for this type of migration - I'd check for that first as preferable to rolling your own solution. – WebElaine Commented Sep 20, 2017 at 14:18
  • thanks for your comment. but there are to many IDs to change. And I also don't know what to do with the field "umeta_id". This is auto-generated and I don't know if and how I should change that. Unfortunately I couldn't find any plugin to do the job (with importing the passwords too). – Cray Commented Sep 20, 2017 at 14:21
  • umeta_id is a random number. As long as you don't have duplicate umeta_ids you can leave it alone. The other columns reference which user the meta belongs to, so it's completely arbitrary. – WebElaine Commented Sep 20, 2017 at 14:32
 |  Show 1 more comment

2 Answers 2

Reset to default 0

Changing the user IDs could be problematic. Other tables reference those - including wp_usermeta but if they are authors, customers, etc. then any tables that hold those items - like wp_posts - reference the author by user ID.

Changing the umeta_ids should be safe, because that value isn't referenced elsewhere that I'm aware of. It wouldn't hurt to check your particular plugins and other tables to see if they are indeed referenced somewhere.

It would be safest to use a plugin to migrate the users. It does appear that you'll have to have your old users reset their passwords, but that's a smaller price to pay than getting customers, authors, etc. all confused.

A couple of possible options: Importing Users into new WordPress site and importing users where password is provided as md5 + much metadata.

You can do that with this simple WordPress user import export plugin, can migrate your password as well

发布评论

评论列表(0)

  1. 暂无评论