# Example Code in PHP how to Create a new User

**URL:** <https://meta.discourse.org/t/example-code-in-php-how-to-create-a-new-user/72186>\
**Category:** Development\
**Created:** [16 Ottobre 2017, 3:14pm UTC](https://meta.discourse.org/t/example-code-in-php-how-to-create-a-new-user/72186 "2017-10-16T15:14:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [16 Ottobre 2017, 4:57pm UTC](https://meta.discourse.org/t/example-code-in-php-how-to-create-a-new-user/72186/5 "2017-10-16T16:57:17Z")

</div>

An import script is usually the easiest way to import users.

> [@mertins-mir](#):
>
> I don’t have shell access to discourse because it is maintained by someone else.

But they’ll give you an API key for the site?

Do you have admin access? Is it a new community or are there existing posts? Could you do the import and restore a backup?

One solution might just be to do a bulk invite.

---

_[View the full topic](https://meta.discourse.org/t/example-code-in-php-how-to-create-a-new-user/72186)._
