Creating Users by Hand
Did you know you can create users by hand by making new text files? Well now you do. Here's how.
User accounts are represented by YAML files in the users/
directory, named according to their email address. The YAML contents must have a password and role of some kind inside to be able to log into the control panel. The simplest role is a Super User.
Walkthrough: Creating a new Super User
- Create a file called
<[email protected]>
. Make sure to use a real email address otherwise that reset password feature won't do a darn thing. - Inside the YAML file add
super: true
andpassword: anything_you_want
, whereanything_you_want
is literally anything you want as a password. - Visit any URL on the site and Statamic will spot that unencrypted password and hash/securify it for you.
- Now you can log in with
anything_you_want
, or the thing you really wanted.
Before being securified:
super: truepassword: anything_you_want
After securification:
super: truepassword_hash: $2y$10$Vopn8T7e.EMVEjxdP5p.g.AU5GTTN4RklvgR2l0dTwSPeJal91v/q
Assigning Non-Super Roles
If you've created roles with limited permissions, you can assign those to your user's YAML file in an array:
roles: - editor - publisher
Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page