Configuring WordPress and Moodle
On this page we describe the steps required to configure WordPress to Moodle OAuth authentication. We assume you have already installed moodle-auth_wordpress in Moodle.
To allow external applications to communicate with WordPress, we need to install the oauth1.0a server. Note that we need to use version 1.0a rather than 2.0 because WordPress currently only supports 1.0a internally. Carry out the following steps:
- Install the WordPress REST API OAuth 1.0a Server https://wordpress.org/plugins/rest-api-oauth1/ and activate it.
- From the Users menu select Applications. The Registered Applications page is displayed. Press the Add New button. The Add Application page is displayed.
- Specify a suitable consumer name and description. The callback URL needs to point to this plugin's auth/wordpress/callback.php script, e.g. http://yourmoodle.com/auth/wordpress/callback.php
- Once the new consumer has been specified, you are provided with a Client Key and a Client Secret key. These will need to be copied over to Moodle.
- Enable the WordPress authentication plugin. Then click on Settings.
- Complete the settings as appropriate, using the Client Key and Client Secret copied from WordPress. Save the changes.
- Disable and order the Moodle authentication methods as appropriate.