Title: WordPress login functionality with parent site
Last modified: August 19, 2016

---

# WordPress login functionality with parent site

 *  [esomarrw](https://wordpress.org/support/users/esomarrw/)
 * (@esomarrw)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/wordpress-login-functionality-with-parent-site/)
 * I’ve asked this question a couple of times but although i get replies i never
   seem to get a final yes or no answer.
 * My organisation want to use wordpress as a blog within our main site. On the 
   main site, as a user, you need to login to do anything apart from simply read
   copy. So on the wordpress site we would need users to login in order to leave
   comments. The functionality needed would be that a user only has to login once(
   on main site or wordpress blog) and the login would be valid on both sites for
   the duration of their visit.
 * Is this possible with wordpress?
 * Look forward to hopefully getting an answer.
 * Thanks in advance
 * RW

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/wordpress-login-functionality-with-parent-site/#post-1797238)
 * Not quite sure I follow here – You already have a site, and you then want to 
   add WP functionality to that site?
 * If thats the case, then you would have to log in twice, as they would use different
   database tables. You probably could write some function that called the other
   login function and supplied it the credentials, but that would be difficult and
   long winded.
 *  Thread Starter [esomarrw](https://wordpress.org/support/users/esomarrw/)
 * (@esomarrw)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/wordpress-login-functionality-with-parent-site/#post-1797239)
 * Yeah we have a site. We want a blog for it and would like to use wordpress. So
   we’re planning on hosting the blog on the main site.
 * I was hoping it might be possible to disable the wordpress database table and
   and use the one from the main site.
 *  [David Gard](https://wordpress.org/support/users/duck_boy/)
 * (@duck_boy)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/wordpress-login-functionality-with-parent-site/#post-1797261)
 * WordPress uses variables called ‘table_prefix’ and ‘base_prefix’ to identify 
   how the DB table name should start (usually just wp_), and then calls the table‘
   wp_user’ and ‘wp_usermeta’.
 * WP calls tables for DB queries using the global variable `$wpdb` (`$wpdb-users`
   for example would print `wp_users` if you use the standard prefix), so in theory
   you could change those variable names somehow to the match your current tables.
 * I’d have no idea how to do that thouhgh, although I guess you could hack one 
   of the core files (this would change back on upgrade though), and you’d need 
   to make sure the column’s matched, else the data will not be picked up.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress login functionality with parent site’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [David Gard](https://wordpress.org/support/users/duck_boy/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/wordpress-login-functionality-with-parent-site/#post-1797261)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
