Fast, easy, light
Install and how to
WordPress Only: If you allow users to log in, register, and change their emails only within WordPress, there is no need to install the phpBB extension.
Bidirectional (Both): If you allow users to register and manage their accounts across both WordPress and phpBB together, you must install the phpBB extension inside phpBB to keep everything synchronized.
phpBB Only: If you allow users to register and update their profiles only within phpBB, you must install the phpBB extension inside phpBB if you want those profile updates to automatically sync across to WordPress. Note that you may have to sync users transferring existent usernames if there are and the integration is used this way.
NOTE: PHP version 7.2 or higher is required.
NOTE: Ensure that the WordPress administrator activating this plugin shares the exact same email address as a user in phpBB, especially if the administrator performing this action is not WordPress User ID 1.
CRITICAL NOTE ON ROOT USERS:
WordPress User ID 1 and phpBB User ID 2 (if they still exist and were not deleted after installation) are completely excluded from the integration code. However, you must ensure that these two accounts do not share their username or email address with any other user ID across phpBB and WordPress.
Before you begin, verify if these two specific User IDs exist and if you are using them. While WP UID 1 and phpBB UID 2 can share the same email or username with each other, neither of them must ever share a username or email with any other account on either platform.
To repeat: Please double-check this requirement before starting if these accounts exist or are actively being used.
WordPress phpBB integration by email
This plugin use cookies and do not change nothing into phpBB or WordPress files or db: it only update the user’s sessions, the email, password (and eventually the user URL), and add users into the linked CMS when they register. Require 6/7 db rows on the WP db options table to work (search with a regexp sql the option_name text w3all into the options table to see).
It is MANDATORY for users to register, change, or update their emails and passwords only within WordPress OR only within phpBB if the companion phpBB extension is not installed on the phpBB side.
Allowing users to register or update their profiles on both platforms seamlessly is only possible if the phpBB-WordPress extension is fully installed and active inside phpBB.
Without that extension, when a user registers or updates their profile inside phpBB, those changes (such as password changes, URL updates, or user creation) will not happen simultaneously in WordPress. The synchronization will be delayed until that user explicitly logs into or visits the WordPress side while authenticated. Alternatively, you can simply disable the profile/email update module inside phpBB to force users to use WordPress for profile management.
There are 1,001 ways to configure the integration between phpBB and WordPress. However, always remember a fundamental rule: this is a WordPress plugin, meaning its code only executes when WordPress pages load!
See how to use and download the phpBB integration extension here: phpBB WordPress common tasks integration extension
If you need to migrate all your existing WordPress users into phpBB before starting the live integration, follow the required transfer steps to get up and running quickly.
Alternatively, you can automate this process over time without running a manual bulk transfer. By setting the option “Add users in phpBB if they do not exist when users log in to WordPress” to YES (available in plugin version 2.9.2 or higher), your existing WordPress users will be automatically created in phpBB the next time they log into WordPress.
Note: This automatic creation will only succeed if a user with the exact same email or username does not already exist inside phpBB.
If you do not manually match your usernames and emails across platforms before starting, remember that the plugin login and profile update functions match accounts strictly by email address.
- Bidirectional Login: A user logging into WordPress with the email
me@you.uswill automatically be logged into phpBB as the user who owns that exact same email address. The reverse is also true: a user logged into phpBB will be authenticated in WordPress as the user sharing that same email address. - Bulk Profile Updates: If multiple users share the exact same email address inside phpBB, all of those phpBB accounts will have their email address updated simultaneously the moment the corresponding WordPress user updates their email to a new one.
- The First-Match SQL Fallback: If multiple phpBB accounts share the same email, a WordPress user logging in with that email who then visits the phpBB side will be authenticated in phpBB as the very first User ID returned by the SQL query matching that email.
- Bypassing the Bridge: To access the other phpBB accounts that share that same duplicate email address, those users must log directly into phpBB. They can never be authenticated into those secondary accounts via the WordPress login bridge.
Crucial Platform Difference: Sharing the same email address among multiple accounts is a native, allowed feature in phpBB, but not in WordPress.
- It is also time to inform all the lovely and cool people about how bad is my English … i am sorry!
Setup phpBB as follow, then setup the db connection values into the plugin admin page, then maybe transfer WP users and fix issues if there are.
Configure WordPress and phpBB
WP MU-MS (Network installations) integration: before to follow, read how to activate this feature and how WP_w3all plugin is required to be configured on each sub-site: WP_w3all for WordPress MS MU (Network installations).
phpBB side settings
- Limit username chars:
on ACP under
BOARD CONFIGURATION -> User registration settings -> Limit username chars:
choose Any letter, Number and Spacers, or Alphanumeric option.
So if you let users to register in phpBB, you’ll be sure they are added in WordPress with the same username or an existent phpBB username containing unwanted chars in WP, where possible, will be added into WordPress purged of these chars, or excluded if the resulting purged username will result to be empty.
Save settings.
Then into phpBB ACP under option Security settings:
Option:
- Allow “Remember Me” logins set to: YES
- “Remember Me” login key expiration length (in days):
may set it to 365 days (or another value)
- Validate browser:
Enables browser validation for each session improving security: Set to YES
Save settings.
phpBB cookie SETTING
Set the phpBB cookies to be available all over the domain if it is not already:
Go under phpBB ACP admin -> Server Configuration -> Cookie Settings
- Set the Cookie domain value as (for example):
.yourdomain.com
NOTE: if on localhost, set localhost. If on subdomain, like mysub.mysite.com, set it using only the domain name so .mysite.com
now change the cookie name in something else or adding some char to it, so old cookies on user’s browsers will not be valid anymore and they will be forced to re-login.
- Cookie path set as single fraction slash: /
Be sure to set correct values.
Save settings, logout, and log back into phpBB.
Based on how you are integrating WP and phpBB, and if using or not the integration extension installed into phpBB, you’ll have to choose to disable the registration in phpBB or WordPress and choose where user’s can update email or register.
Note: to disable the Edit account settings module in phpBB on
ACP -> System Tab -> Module management -> User Control panel
disable the Edit account settings module (where an user can change the email and update password in phpBB ucp).
WordPress side
Install the WP w3all WordPress phpBB integration plugin then on WP admin open
- Settings -> WP w3all
Setup required database connection values
and the URL setting as required (read inline hints)
Note: If your WordPress is served under https, then force also phpBB to be https, and vice versa, or http if WP is under http.
All done!
Activate options and use shortcodes or widgets.
Read inline hints and the How to section more below!
Template embed phpbb into WordPress:
if you wish (not required) to follow adding also the phpBB responsive embedded iframe into a WordPress page:
Best way compatible with all themes – using shortcode
https://www.axew3.com/w3/2022/02/the-awesome-iframe-template-integration-using-shortcode/
Old way, not working on new block themes – using a WordPress page
https://www.axew3.com/w3/2020/01/phpbb-wordpress-template-integration-iframe-v5/
How to and shortcodes list
phpBB WordPress integration security
Custom config.php phpBB file inclusion
WordPress Multisite: WP_w3all for WordPress MS MU (Network installations)
phpBB usernames migrated/added into WordPress with native language characters
Shortcode – the awesome template integration using shortcode
Shortcode – phpbb last users posts by IDS
Shortcode – phpBB PM notification in WordPress
Shortcode – phpBB user notifications in WordPress
Shortcode – to parse/display single phpBB posts into WordPress
Shortcode – last phpBB topics/posts into WordPress
Shortcode – HeartBeat Last Topics Shortcode
Shortcode – last phpBB topics/posts into WordPress by Forums IDS
Shortcode – login form
Shortcode – last topics grid in WordPress with topic’s attachment (img or file)
How to (advanced) add custom code/hooks for external plugins
How to (advanced) plugins Global vars (plugin vers. 3>): how to use with the custom_functions.php file
If you want to avoid the phpBB user session update read phpBB user session update
Use the WordPress phpBB integration to display phpBB posts into another WP site from another domain
Switch WordPress Roles and phpBB groups functions
How to (advanced): WP roles and phpBB groups switches
How to style widgets and shortcode output if they need to be adjusted to look like my theme
How to WordPress phpBB integration without linking users
Appreciations goes here – Thank You!
