Integrate PHP website with Wordpress user authenti

2019-02-15 09:15发布

问题:

I have an existing Wordpress website that requires users to login if they want to access additional content (full stories, archive of past stories, etc).

I've built a new website using PHP and MySQL that will is hosted on a different server. This website is intended for the same audience who visit the article website mentioned previously.

The new website will provide access to database content that is not publicly available and I would like to authenticate visitors using the login details already used by the Wordpress website.

Are there API calls that would allow authentication against the Wordpress user accounts from the other server using PHP?

回答1:

you can authenticate them using: http://codex.wordpress.org/Function_Reference/wp_signon