2021-08-16 08:33:53 +00:00
---
title: Wordpress
---
2022-06-15 19:31:34 +00:00
< span class = "badge badge--secondary" > Support level: Community< / span >
2021-08-16 08:33:53 +00:00
## What is Wordpress
From https://en.wikipedia.org/wiki/WordPress
:::note
WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes
:::
:::note
2022-05-09 19:22:41 +00:00
There are many different plugins for Wordpress that allow you to setup SSO using different authentication methods. The plugin that is explained in this tutorial is "OpenID Connect Generic" version 3.8.5 by daggerhart. This plugin uses OpenID/OAUTH2 and is free without paywalls or subscriptions at the time of writing this. The plugin is available for free in the Wordpress Plugin gallery.
2021-08-16 08:33:53 +00:00
:::
## Preparation
The following placeholders will be used:
2022-05-09 19:22:41 +00:00
- `wp.company` is the FQDN of Wordpress.
- `authentik.company` is the FQDN of authentik.
2021-08-16 08:33:53 +00:00
2021-10-18 14:35:12 +00:00
### Step 1 - authentik
2021-08-16 08:33:53 +00:00
In authentik, under _Providers_ , create an _OAuth2/OpenID Provider_ with these settings:
:::note
Only settings that have been modified from default have been listed.
:::
**Protocol Settings**
2022-05-09 19:22:41 +00:00
- Name: Wordpress
- Client ID: Copy and Save this for Later
- Client Secret: Copy and Save this for later
- Redirect URIs/Origins: `https://wp.company/wp-admin/admin-ajax.php?action=openid-connect-authorize`
2021-08-16 08:33:53 +00:00
### Step 2 - Wordpress
:::note
Assumption is being made that you have successfully downloaded and activated the required plugin "OpenID Connect Generic" by daggerhart
:::
In Wordpress, under _Settings_ , Select _OpenID Connect Client_
2021-08-16 15:31:33 +00:00
:::note
2021-08-16 08:33:53 +00:00
Only settings that have been modified from default have been listed.
:::
2022-05-09 19:22:41 +00:00
- Login Type: OpenID Connect Button on Login (This option display a button to login using OpenID as well as local WP login)
- Client ID: Client ID from step 1
- Client Secret: Client Secret from step 1
- OpenID Scope: `email profile openid`
- Login Endpoint URL: `https://authentik.company/application/o/authorize/`
- Userinfo Endpoint URL: `https://authentik.company/application/o/userinfo/`
- Token Validation Endpoint URL: `https://authentik.company/application/o/token/`
- End Session Endpoint URL: `https://authentik.company/application/o/wordpress/end-session/`
2021-08-16 08:33:53 +00:00
:::note
2022-05-09 19:22:41 +00:00
Review each setting and choose the ones that you require for your installation. Examples of popular settings are _Link Existing Users_ , _Create user if does not exist_ , and _Enforce Privacy_
2021-08-16 08:33:53 +00:00
:::
2021-10-18 14:35:12 +00:00
### Step 3 - authentik
2021-08-16 08:33:53 +00:00
In authentik, create an application which uses this provider. Optionally apply access restrictions to the application using policy bindings.
2022-05-09 19:22:41 +00:00
- Name: Wordpress
- Slug: wordpress
- Provider: wordpress
- Launch URL: https://wp.company
2021-08-16 08:33:53 +00:00
## Notes
:::note
OpenID Connect Generic Client Reference link: https://wordpress.org/plugins/daggerhart-openid-connect-generic/
:::