Title: WordPress login and php project
Last modified: April 8, 2019

---

# WordPress login and php project

 *  [dvalpha](https://wordpress.org/support/users/dvalpha/)
 * (@dvalpha)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-login-and-php-project/)
 * Hi all!
 * I have a question about a project I am doing:
 * We are setting up a project in php, but the part of user registration and login
   I would like it to be with wordpress.
 * My question is:
 * How can I collect wordpress session variables from a file in php? That is, I 
   want to collect the session data to let or not the user to the part of php we
   are doing.
 * I hope I explained it well.
 * Thank you

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-login-and-php-project/#post-11404829)
 * WordPress does not use session variables by default. It could be some plugins
   or themes do, but not core WP. User authentication is managed with cookies. If
   your code is under the same domain as WP, your code is sent cookie data with 
   the request, but it’s not that simple to verify that the cookie is still valid.
   You are better off making a custom Ajax or admin-post.php request to WP asking
   it to verify the logged in status.

Viewing 1 replies (of 1 total)

The topic ‘WordPress login and php project’ is closed to new replies.

## Tags

 * [login](https://wordpress.org/support/topic-tag/login/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [session](https://wordpress.org/support/topic-tag/session/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/wordpress-login-and-php-project/#post-11404829)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
