WordPress and phpBB?

Update 19 February 2017 – FYI, bbPress is a WordPress plugin that can add a forum to your WordPress site. It’s not nearly as sophisticated and functional as phpBB but it may be good enough for your needs.

It’s not too surprising that people will want to integrate WordPress and phpBB. WordPress after all is an extremely popular blogging program, but really it’s a lightweight content management system. I use it for this site. Why? Because it’s much easier than doing everything by hand with HTML or even a fancy web page program like Dreamweaver. There are thousands of themes and tens of thousands of plugins that let you extend the functionality of WordPress in lots of ways. The quality of some of these plugin are amazing. The design of some of WordPress themes are as well. All this plus it is free, except possibly for some plugins where you get nagged to buy a “professional” version.

In my mind, WordPress is the best-of-breed lightweight content management system out there and a phenomenal blogging tool. But WordPress has limits. Like any content management system, at some point it becomes not quite enough. Try managing a hundred pages with WordPress, for example. WordPress also has some drawbacks. Unlike phpBB, where a modification and extension review is rigorous and must be approved by a peer-reviewed team of developers to get listed, in WordPress it’s pretty straightforward to get a plugin listed if you follow their coding standards. The quality of plugins are thus suspect.

There are forum plugins for WordPress that are generally decent. None come close to having the quality and breadth of phpBB. This is not surprising. phpBB is a best-of-breed forum solution. It is continuously updated, quality reviewed and has a passionate set of developers who strive to write very good code. Unsurprising I get regular requests to integrate phpBB into WordPress.

WordPress and phpBB can coexist, as long as you keep each in their own spaces. For example you could put the forum in a /forum folder and have the rest of the site in WordPress. However, phpBB can’t use WordPress’s authentication system, and visa versa. phpBB styles don’t match WordPress themes. A number of clever WordPress developers have tried to bridge the two platforms. The solutions are inelegant. For example, WP-United tries to create a common authentication system, so that if you are a forum user you will also be a user in WordPress. Unfortunately, as of this writing, WP-United supports phpBB 3.0, not 3.1. It’s really just one developer and he seems to not be actively supporting it. Worse, when I have installed it I found it flaky so I didn’t warrant the work. BridgeDD is another effort, but it too only supports phpBB 3.0.

The bigger problem is that clients naturally want phpBB to work inside their WordPress theme, but it won’t. That’s not to say I haven’t done this for a number of clients. I can usually make it work but takes considerable trial and error. Sometimes there are conflicts between WordPress and phpBB styles, such as using similar names for classes. The result is often a solution that looks nice but may run slowly. The larger problem is that if the WordPress theme changes, phpBB won’t automatically pick up the new style changes. Someone has to retrofit it, and that requires someone with expertise in HTML, CSS, phpBB and WordPress.

So phpBB and WordPress don’t dance together and probably never will. One approach I sometimes recommend is to put the forum into a subdomain, like forum.mysite.com so the user sort of expects it won’t look the same. You can also create a domain just for the forum, like mysiteforum.com and link the two. This allows both phpBB and WordPress to inhabit separate areas and do their things elegantly while also setting the user expectation that both have separate purposes.

If you do want to integrate them expect a non-optimal experience at best.

Feel free to contact me if you want me to try but do expect the work to be costly, generally in the hundreds of dollars range, if it can be done at all.

Digests version 2.2.27 released

I created a new and likely last final version of the digests mod (for phpBB 3.0). It is mainly to make some bug fixes, most of which I discovered when testing the digests extension in development. The new version can be downloaded from my digests page.

From the change log:

  • Removed the non-British English language contributions as they are woefully out of date and thus confusing. If a translation is needed, translate from the English version. See contrib/readme.html for more suggestions.
  • Fixed a bug in the unmark all link in Edit subscribers. Also fixed the column headers to collapse language strings into one field.
  • Edit subscribers and balance load digest hour send time now properly converts hour to digest time zone (set in Digests general settings).
  • Removed the ability in Mass subscribe inactive users, since mail_digests specifically filters them out.
  • Fixed an issue in mail_digests.php where it incorrectly reported private messages read.
  • A digest will show a list of subscribed forums in the footer if you selected only certain forums to appear in the digest. If you chose bookmarks, the message in the footer will indicate that bookmarks were chosen.
  • The maximum number of posts in a digest setting works. Previously it was ignored.
  • The new posts only in a digest setting works. Previously it was ignored.
  • Added better pattern matching for removing images in digests if that is elected. Some images were not completely removed.
  • Fixed issues that did not correctly embed the .php suffix in some links.

Upgrading phpBB

(Post updated July 17, 2017 to reflect phpBB 3.2.)

In general, upgrading from a major version to another version (2.0 to 3.0, for example) or from a minor version to another minor version (3.0 to 3.1) is error prone and a hassle, particularly if you used shared hosting or are not technically inclined. In these cases you might want to contact me and have it done professionally.

The phpBB group has instructions for upgrading that are linked below:

There are many ways of upgrading phpBB 3.1 to a newer version of 3.1. The phpBB group suggests the automatic update package. I disagree. It is faster and simpler to use the changed files method. This is because the automatic update package involves the hassle of telling phpBB how to use FTP and setting various file permissions. In addition, I have found it error prone.

Here is how I upgrade clients easily with the changed files method:

  1. I back up the forum’s database locally using the Administration Control Panel, Maintenance tab.
  2. I make a file backup of the phpBB directory, usually using the web host control panel file manager. This is an extra precaution but is probably not necessary if you are careful with the remaining steps. Select all files and directories in the phpBB root folder and select the compress option. Give the file an easy to remember name like forum_files_backup_before_upgrade_to_3.2.1.gz. Store it wherever you want on your web host or download it, just make sure you don’t accidentally delete it.
  3. I download the changed files archive for the current version of phpBB.
  4. Once downloaded I expand (uncompress) the archive. Inside are more archives showing the changed file for each micro version. For example, when downloading the 3.2.1 archive you will find phpBB-3.2.0_to_3.2.1.zip archive. I’ll expand that. It will create a directory called phpBB-3.2.0_to_3.2.1. You should expand the archive for your current version of phpBB, which you can find on the main Administration Control Panel web page.
  5. I go into this folder. This contains all the files that have changed from that version to the newest version. Be careful not to accidentally delete the following:
    1. config.php
    2. files folder
    3. images folder
    4. store folder
  6. Carefully use FTP to upload these to your phpBB root folder using FTP. File folders should match. For example, if there is an adm folder in the archive there should be an adm folder in the directory you are uploading to, your phpBB root directory. You will overwrite the old files, which is fine because they have been improved to add features and fix bugs.
  7. Inside the main archive is an install directory. I upload that to the phpBB root folder.
  8. For upgrading to phpBB 3.2, change the URL to the install folder, ex: http://www.myforum.com/phpbb3/install. Click on the update tab. Select the option to update the database only.
  9. For upgrading to a newer version of phpBB 3.1, run the program install/database_update.php, ex: http://www.myforum.com/phpbb3/install/database_update.php.
  10. After completion, I delete the install folder using FTP.

That’s it, you are done.

If for some reason something is not working correctly, you just recover your files and database since they are backed up. You may need to manually clear the contents of the phpBB cache folder with FTP.

January 2016 work summary

In January, most of my work was concentrated with two established clients. Curiously few new clients came in through the email box.

For client #1,as part of a small team I am helping her to not only get her forum rehosted but also to solve a number of technical problems with her various websites, for which she lost permissions due to a tech that abandoned her. Basically she needed a lot of coaching and hand holding because she is not a technical person, but is happy to pay for services. It involved a lot of back and forth Skype sessions, and working with other techs to untangle her domains to do what she wanted done. Among the things I did for her:

  • I provided guidance on integrating Windows with a Mac (her primary computer) and suggested she purchase and install Parallels Desktop for the Mac so she could run a few Windows programs that she depends on without the expense of buying a new machine. I suggested she upgrade her Mac to 16GB of memory first (she had only 4GB).
  • She wants to use GMail to manage a number of email accounts on different domains. So I researched the GMail Pro service and the issues involved in pointing her MX records to Google so she could do this.
  • Discussed moving her static web site to a content management system, which will likely be WordPress. Found some WordPress plugins that might meet her need need for a directory solution.
  • Moved her forum from one host to another. Challenged due to some massively long posts that timed out when trying to load them into the database. Had to also fix some folder permissions.

Client #2 had a number of issues going on. He lost his support person and had to manage the forum by himself, and his group and group forum permissions were inconsistent and a mess. Some of the things I did for him:

  • Tutoring on how to put users into groups and answering general questions, like how to determine which permissions were used for a particular user
  • Answered questions on how to set up anonymous posting, and some of the potential downsides (including potential spam and the ability of the public to view his forums)
  • Created some offline reports in PHP to allow him to see the extent of her permission problems. Used some phpBB permission objects to delineate which groups could read forums. This was necessary because he had hundreds of forums and dozens of groups, making getting this information from the user interface difficult. Also created a report showing which users had forum permissions outside of group permissions. Eventually we figured out a procedure to “wipe” forum permissions for all groups, which I blogged about.
  • Patched phpBB so he could delete a forum. This was needed because his database is SQLServer and it is necessary to use the CAST function for numbers of a certain size, and phpBB doesn’t do this (it’s a bug). Put together an estimate to move their forum’s database from SQLServer to MySQL where these issues are unlikely to happen. Hope to migrate the data using MySQL Workbench.

Work for other clients:

  • Converted a forum from phpBB 3.0.7-PL1 to 3.1.6. Tried a number of styles, user settled on Platinum Red. Integrated their logo. Changed the PHP version to one supported by 3.1 (must be PHP 5.3.3+) and did the conversion on my own machine to get around PHP timeouts, which added considerable time and expense and made me rethink my pricing. I now have a $50 surcharge for these types of conversions for shared hosts, since the work must be done offsite. Restoring the search index also had to be done on my machine because of HTTP 504 timeouts on his shared host.
  • Assisted in a registration issue. Users got a false message saying that Javascript was not enabled. I had previously had the user install Cleantalk to address his spam problem. The problem turned out to be a Cleantalk issue that the vendor eventually fixed.