Is it possible to move users along with their passwords? I can see the mapping option, but how do I output password in a template (I'm moving data between craft installations).

The below code does not work.

{% for user in craft.users().status(null).all() %}
{% endfor %}

1 Answer 1


Password hashes aren't included in the default user query for security reasons, but if you want to force them to get added, you could use:

{% for user in craft.users().status(null).addSelect(['users.password']).all() %}
  • I also need to migrate 800+ users and passwords from C2 to C3. I've got the following but password is blank each time. {% for user in craft.users.group('publicUsers').addSelect(['users.password']) %} <password>{{ user.password }}</password> {% endfor %}
    – CreateSean
    Feb 13, 2020 at 19:06
  • @CreateSean did you figure this out?
    – dmatthams
    Mar 22, 2021 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.