I want to use Wordpress for the user management of a simple web app.
What I really need to do:
- Check if a user is logged in
- Save meta data to a logged in user
- Read meta data of a logged in user
Doing the register process in my web app would be nice, too, but it would also work on another page.
Is it possible to do these things "outside" of the WP installation (but on the same domain)? For example via ajax requests?
Where can I start?
EDIT:
I just read about including wp_load.php to use the WP functions. Is that a clever approach?
Thank you so much!
I want to use Wordpress for the user management of a simple web app.
What I really need to do:
- Check if a user is logged in
- Save meta data to a logged in user
- Read meta data of a logged in user
Doing the register process in my web app would be nice, too, but it would also work on another page.
Is it possible to do these things "outside" of the WP installation (but on the same domain)? For example via ajax requests?
Where can I start?
EDIT:
I just read about including wp_load.php to use the WP functions. Is that a clever approach?
Thank you so much!
Share Improve this question edited Sep 29, 2020 at 14:37 Timo asked Sep 29, 2020 at 14:24 TimoTimo 11 bronze badge1 Answer
Reset to default 1You might want to take a look at the REST API that comes out of the box with WordPress.
Here are the docs for Users, you can register users and list/retrieve/update them https://developer.wordpress/rest-api/reference/users/
Here's the information about how to authenticate to use the API (so that you can Reigister Users for instance) https://developer.wordpress/rest-api/using-the-rest-api/authentication/