Adventures In Building WaaS Sites


Note: This article covers building WaaS projects using WP Multisite and WPUltimo. However, you now have other options such as OpenSaaS.io. So if you’re looking for alternatives to using WP Multisite, check that out.


“WordPress as a Service” is something that developers have been doing for a number of years. But it’s only in the last couple of years that the concept has really taken off. This is because you have more reliable plugins such as WPUltimo and more plugins that are multisite aware and works well with “white labeling’.

However, as a developer who might be looking to build out such a service, even today you’re still restricted to a small number of plugins that are truly capable of operating in a WaaS environment.

Why is this the case? Three reasons:

  • Most plugins aren’t tested in a Multisite environment. 95% of WordPress deployments do not use this mode and most plugin developers are happy to give up that 5% instead of doing the extra development and testing work required for a Multsite environment.
  • Most plugins features and security don’t consider the multi-tenant mode that is the norm for Multisite. So sensitive functions are automatically available to admins on subsites when they should only be available for superadmins.
  • Few plugins offer the option for white labeling or work well with white labeling plugins. So if you want a branded WaaS, you’re usually showing off your Plugin vendor’s name(s) somewhere in wp-admin.

Still, there are a few plugins that work acceptably well for a WaaS project – none are perfect but these make it easier than most to get the job done with minor tweaks.

So, here, in our experience, is a good list of things that work well – note though that EVERYTHING on the list is a PREMIUM plugin. Even if there’s a free version, the only version that we’ve confirmed works with Multisite is the premium version. (No one said that building out a WaaS site is cheap!)

Beaver Builder

Beaver Builder – a page builder that is especially Multisite friendly. While “Divi” is prettier and Elementor has a larger base, Beaver Builder is more practical and compatible with WPUltimo and the WaaS concept.

This plugin includes a white label option and makes it very easy to turn on/off components.

We marry it with its Beaver Builder Theme and its Beaver Builder Themer to get the best all-round white label page building experience.

All three plugins should be network activated.

Admin Menu Editor Pro

Admin Menu Editor Pro – indispensable for making sure that end customers don’t access menu options that are not needed.

This plugin should be network activated.

UltraAdmin

UltraAdmin – used for theming the admin area to make it look less like WordPress. The author also publishes LegacyAdmin and MaterialAdmin; but UltraAdmin seemed to be more compatible and easier to manage CSS changes.

This plugin should be network activated.

Simple:Press Member Subscriptions

Simple:Press Member Subscriptions – this is a fork of Paid Memberships Pro and has some changes in it that hides sensitive functions from the end user & subsite admins while still allowing access to them when logged in as a super user.

This plugin should NOT be network activated – it should be activated directly on your template site (which will then be copied to your live sites as users subscribe).

Simple:Press Member Manager

Simple:Press Member Manager – this is a fork of Ultimate Member and has some changes in it that hides sensitive functions from the end user while still allowing access to them when logged in as a super user.

This plugin should NOT be network activated – it should be activated directly on your template site (which will then be copied to your live sites as users subscribe).

Simple:Press Forums

Simple:Press Forums – a comprehensive suite of discussion forum functions.

This plugin should NOT be network activated – it should be activated directly on your template site (which will then be copied to your live sites as users subscribe).

Updraftplus Plus

Updraft Plus is used for backing up your multi-site network. In our experience it’s the most reliable backup and restore plugin, especially for larger sites. As long as your server has the resources needed, Updraft Plus will get the job done. You need the premium version for use in a WaaS environment.

Misc Plugins

Other plugins that we’ve used and we know work well are:

  • User Role Editor
  • Metabox.IO (though there is a minor incompatibility with Beaver Builder at the time of this writing)
  • MailGun
  • Awesome Support (helpdesk)

Beyond Plugins

Once you get a good base set of plugins, you are still going to have a ton of niggling issues that need to be resolved. Here are a few things you’ll run into:

Gutenberg Block Editor Issues

When you’re building out a WaaS site and you want to mask its WordPress origins, the Gutenberg Block Editor makes it hard. Very hard. You can use the Classic Editor plugin to disable Gutenberg of course. But then you give up all the benefits of blocks and the growing flexibility that Gutenberg brings to the table when building out pages and posts.

The biggest problem is the Welcome Modal that advertises its WordPress origins. And some of the menu options under the GB menus has “WordPress” clearly labelled.

To remedy this we had to write some code – a small custom plugin – that removed the offending menu items and blocks the Welcome Modal. (If you want that plugin you can grab it here.)

Custom Plugins

Speaking of custom plugins, you’ll almost always need one to place tiny scraps of code that are needed to tweak and brand your site. So you might as well include a stub plugin right off the bat because you WILL need it. Make sure it’s network activated because some of the tweaks you’ll be doing will only occur on network hooks.

Here are just some of the hooks that we’ve utitilized in our custom plugin:

/* Run things after WordPress is loaded */
add_action( 'init', array( $this, 'required_files'), -20 );
		
/* Replace some text */
add_filter(  'gettext',  array( $this, 'translate_words_array' )  );
add_filter(  'ngettext',  array( $this, 'translate_words_array' )  );
		
/* Add custom field to PAGES to hold description of page */
add_filter( 'rwmb_meta_boxes', array( $this, 'mbio_register_meta_boxes' ) );
		
/* Modify Beaver Builder Customizer Panels */
add_action( 'customize_register', array( $this, 'customize_register' ), 11 );
		
/* Hide the Add Existing User section when users are being added on a subsite */
add_action('admin_head', array( $this, 'remove_existing_user_form' ) );	

/* Disable full screen gutenberg */
add_action( 'enqueue_block_editor_assets', array( $this, 'jba_disable_editor_fullscreen_by_default' ) );	

/* WPULTIMO: After data has been copied, make sure that we set a flag indicating we need to initialize and reset certain data elements upon first load */
add_action( 'mucd_after_copy_data', array( $this, 'mucd_after_copy_data' ), 10, 2 ) ;
		
/* Initialize some data the first time a site is loaded after being copied */
add_action( 'admin_init', array( $this, 'do_site_first_run'), 30 );
		
/* WPULTIMO: Search and replace */
add_filter( 'wu_search_and_replace_on_duplication', array( $this, 'wu_search_and_replace_on_duplication' ), 10, 3 );

It might look like a lot but most of the code implemented in the hooks are just a few lines. The largest function is the text replacement function.

CSS

When building out a WaaS site be prepared to write some CSS. And, if you use an admin theme skinner like UltraAdmin, you’ll find yourself writing a LOT more CSS to account for the minor UI quirks that are introduced.

CSS Location

We keep CSS related to admin theming inside the admin themer itself (in our case, usually UltraAdmin). This way, when we turn off the themer, we automatically turn off css tweaks related to it.

We keep most of our other CSS inside our theme (a Beaver Builder child theme).

Cross-Over Functions Between Plugins

The more plugins that you add to a site the more you’ll see duplicated functions. For example, Menu Admin Pro and UltraAdmin have some cross-over functionality. So, for consistency we manage menus and dashboard widgets with Menu Admin Pro and turn off UltraAdmin’s menu management functions.

Another plugin with common cross-over functionality in WaaS sites is User Role Editor – it has cross-over functions with Menu Admin Pro and Member Manager.

You just need to decide which plugin will handle which functions. If you’re not clear in your head about this, you’ll find yourself turning on configuration options in one place and wondering why it’s not working.

Things That We’ve Tried That Did Not Work

In order to narrow our list of things down to those that worked, we had to try a ton of things that didn’t work. Here are some of them:

  • WPMUDEV – they have a great white labeling plugin but we found that with our need for Menu Admin Pro and Ultra Admin, most of the functionality was duplicated. All we had to do was write a small plugin to handle text replacements on the screen and we no longer needed the Branda plugin.
  • WooCommerce – this one is a performance hog and it’s difficult to get all the items you don’t need out of the way of your sub-site admins (like Jetpack). If we had to build out a full e-commerce white label site we’d probably try EDD (Easy Digital Downloads) next.
  • MailPoet – we were so disappointed in our inability to use this one. It’s fatal flaw is that the default “WordPress Users” list includes ALL users from ALL sub-sites. This “feature” was present no matter which site you’re on and regardless of whether you individually activated the plugin on each sub-site or network activated it. Needless to say this was a deal breaker.

We also tried (or attempted to try) a bunch of smaller plugins that were explicitly targeted at WaaS sites. Unfortunately most of them seemed to throw errors in the WP error logs, needed extensive modification to live up to their potential, lacked support from the authors or were otherwise just a bad experience. We were saddened to learn this the hard way because some of these plugins are sorely needed in the WaaS world.

So we’ve given up on smaller plugins for the most part, no matter how good they sound. Our thought process is that if we have to work that hard to make a plugin work, we might as well put the effort into a more established plugin that will likely have strong support from the publisher.

Security

Given the heavy load that WaaS sites bring to a server, adding security plugins was one thing we did NOT want to do. Instead, we pay for an account on CloudFlare to proxy all traffic and weed out as much bad stuff as possible. We then add a set of NGINX rules (one-click feature with the WPCloudDeploy plugin) to filter out bad traffic that reaches the servers.

However, to protect yourself you might still want to add a 2-factor plugin and enable it for all your super admins (and maybe even your sub-site admins).

Things that we will likely use in the future

We have an eye on plugins that we are likely to need in the future and we reasonably expect to work well with Multisite. At the top of the list the ones from the folks over at Delicious Brains:

  • WPOffload Media
  • WPOffload SES
  • WPMigrate DB Pro

Wrap Up

Unfortunately, despite the increase in the number of plugins with true support for WordPress Multsite, it’s still very difficult to built out a true WaaS site – there’s a lot of tiny things that you have work around.

However, if you’re able to understand the WordPress hook architecture, can read some code when necessary to understand what it’s doing and can write CSS, you’ll likely be far happier with the outcome. Oh, and you definitely want to test, test and test some more – with lots of attempts at creating and destroying your sub-sites under a lot of different use cases, users and user types.

Alternative Options

There is an alternative to using WordPress Multisite – you can use WPCloudDeploy to sell individual WordPress sites with WooCommerce. This can help you to create a WaaS style service that does not depend on WordPress Multisite and is far more scalable and flexible:


Note: This article was written based on WPUltimo version 1.x. Since then WPUltimo 2.x has been released. Hence, some of the items mentioned in here might be out of date or simply not apply at all.


Was This Article Useful? Or do you have questions or comments about it (or our products & services)? We'd love to hear from you!

Please enter your name.
Please enter a message.
You must accept the Terms and Conditions.
Please check the captcha to verify you are not a robot.

Automatic Notification Of New Articles

Sign up to get automatic notifications of new articles.  This is a different list than our standard list - you only get new articles once a week (usually on Mondays).  No other emails will be sent unless you sign up for our general list as well.

Posted in