website/integrations/platforms/wordpress/index.md
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
:::info There are many different plugins for WordPress that allow you to set up SSO using different authentication methods. This tutorial uses the "OpenID Connect Generic Client" plugin, version 3.8.5, by Jonathan Daggerhart. This plugin uses OpenID/OAuth2 and is free without paywalls or subscriptions at the time of writing. The plugin is available for free in the WordPress Plugin Directory. :::
The following placeholders are used in this guide:
wp.company is the FQDN of WordPress installation.authentik.company is the FQDN of authentik installation.:::info This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. :::
To support the integration of WordPress with authentik, you need to create an application/provider pair in authentik.
Strict redirect URI to https://wp.company/wp-admin/admin-ajax.php?action=openid-connect-authorize.offline_access to the list of selected scopes.:::info This guide assumes that you have successfully downloaded and activated the required "OpenID Connect Generic Client" plugin by Jonathan Daggerhart. :::
In WordPress, under Settings, select OpenID Connect Client.
:::info Only settings that have been modified from default have been listed. :::
email profile openid offline_accesshttps://authentik.company/application/o/authorize/https://authentik.company/application/o/userinfo/https://authentik.company/application/o/token/https://authentik.company/application/o/wordpress/end-session/:::info Make sure to include the offline_access scope to ensure refresh tokens are generated. Otherwise your session will expire and force users to manually log in again. Refer to the OpenID Connect Core specification for more information. :::
:::info Review each setting and choose the ones you require for your installation. Examples of popular settings are Link Existing Users, Create user if does not exist, and Enforce Privacy. :::
In authentik, create an application which uses this provider and directly launches WordPress' backend login-screen. Optionally apply access restrictions to the application using policy bindings.
:::info OpenID Connect Generic Client Reference link: https://wordpress.org/plugins/daggerhart-openid-connect-generic/ :::