What You Need to Understand When Building SaaS for Business with WordPress Multisite

We have built 7 successful SaaS solutions on top of WordPress, some having tens of thousands of subsites in a Multisite environment. I’ve personally consulted and built extensions for a couple more with over 100K subsites in a network, which was pretty cool.

Basically, no project is complicated or problematic until it grows. Real issues are faced once your regular traffic and user base grows and you start hitting various limits in terms of performance and security when serving data to your visitors. 

Building SaaS for Business

1. You Need to Bridge the Disconnect Between SaaS and Enterprises

Let’s leave WordPress aside for a moment.

SaaS development is language and platform-agnostic.

WordPress is no exception to the rule. I’ve given multiple talks on SaaS development on top of WordPress:

The main considerations that go into building SaaS for business are related to infrastructure, processes, regulations.

The legal framework isn’t contingent on a software stack.

Certain matters like “data privacy” support or “accessibility” do serve as requirements. WordPress handles these adequately.

SaaS applications deal with sensitive user data — payments, personal details, team groups, business-specific details. Even on a B2C level, SaaS applications are complex software solutions hosted in the cloud that isolate data in silos for every customer account.

Enterprises care about legal and ROI. Legal risks and challenges are among the top considerations for multinational corporations and large enterprises.

And due to the complex process of deploying a new application (considering the onboarding and training for hundreds of people, alignment with ERPs, CRMs, coordination between various departments), ROI should be predictable and measurable. Or at least the profitability.

In order to combine both worlds together, you need to revise seven different disciplines (in terms of requirements):

  • Security
  • Privacy
  • Data Governance
  • Availability
  • Performance
  • Interoperability
  • Compliance

There’s little correlation between the business requirements and the technical stack.

2. You Need Skills to Master SaaS

Depending on whether you’ll go for a single site or multisite (up to your strategic decision based on your business needs), you’ll need to do the following:

  • Focus on code quality on all layers (optimized PHP, highly performant JavaScript with proper AJAX requests for pulling data, SQL queries, fetching a smaller number of resources including styles and images),
  • Set up a scalable server environment, and
  • Fine-tune all requests between the moving wheels through load testing.

The vast majority of the themes and plugins out there are built with flexibility in mind, and trying to serve generic needs (i.e. working in as many use cases as possible). This leads to a good chunk of code that loads everywhere, or multiple scripts and hooks triggered on every single page load that is adding overhead to your application.

This isn’t noticeable at first until the traffic and database grow enough to exponentially slow down the whole solution until you need to pay crazy money for massive cloud solutions and rewrite most of the code.

Building SaaS for Business

In essence, your codebase should be built in a performant manner, highly optimized and benchmarked for speed. To do this, you need:

  • Excellent programming know-how
  • Experience with databases and servers in order to build the right set up that could handle at least several times the traffic and data volume that you’re expecting over the next 3–4 years
  • Understand Linux administration
  • Performance boosting of nginx, php-fpm, the flavor of MySQL you’re using.
  • Add caching layers that don’t harm the user experience while speeding up the site by reducing the dynamic requests.
  • Serving pregenerated static HTML, or data.

Traditionally huge sites may go outside of the standard best practices by introducing more innovative algorithms, relying on custom database tables outside of the standard WordPress schema (or even NoSQL databases), running scalable cloud containers with load balancers in-between, additional external services to reduce the load on the main infrastructure, and even optimizing the network for faster load times.

Media-heavy solutions often innovate with custom image formats or highly compressed images generating smaller media sizes for preview, lazy loading, and other tricks to sort out major speed bumps.

Building SaaS for Business

3. You Need to Determine Requirements to Identify Solution

SaaS solutions are best hosted in the cloud (for scalability purposes), so any web-related stack would be in order as long as it’s a good fit for building SaaS for business.

I’ve met founders of large SaaS applications who pick different technologies for their businesses – the MEAN stack being recently popular due to the rise of Node.js, Ruby on Rails, Python (with Django), Java EE, various PHP frameworks and even ASP.NET MVC projects. We have built 7 SaaS solutions on top of WordPress over the past few years that pretty well with the right architecture and planning.

The most important part about picking the right stack is figuring out the requirements for your SaaS and what’s the best way to scale it in the long run (unless you want to build an affordable MVP and start from scratch once you get some funding).

Different programming languages and platforms are good in different things, so you may want to talk with a software architect or a language-agnostic consultant who can advise you on the best way to launch your product.

Basically, there is no “SaaS stack” that is a common solution for SaaS owners building a new application. Picking the right technical stack is very important though, and having someone on your team who is capable of understanding your needs and designing the architecture is paramount.

4. Challenges Are to Be Expected When Building SAAS

Challenges would arise both on the technical and the business end.

  • Some programming languages are more mature while others provide the latest and greatest (although still somewhat experimental).
  • It’s easier to find developers for some languages or platforms, and sometimes it’s cheaper. That may be pretty relevant depending on your budget.
  • Some programming stacks are heavier and hosting may be a huge chunk of your costs in the long run. On the other hand, most of those are strongly-typed languages that come with various safety measures which may facilitate your security, stability or scalability goals as the project grows.
  • Building a SaaS on top of a framework or an entire product may be a good idea (and a good cost deduction), but that only works if the platform is tailored for this kind of projects. For example, building a media-related SaaS may be possible on top of a CMS while an eCommerce-based SaaS could probably leverage the current codebase of an open-source eCommerce platform without having to reinvent the wheel.
  • Finding senior talent for a solution built from scratch isn’t trivial. It’s easy to build a non-scalable architecture without a team that comes with a solid technical background and experience in the field. On the other hand, starting with a platform usually leads to a certain burden. popular platforms are designed to be general-purpose and serve various industries and different types of customers. Therefore, a lot of code is being included or executed which has no production value for your service – unless it’s beneficial for your needs and goals.
Building SaaS for Business

5. Flexibility Is of Utmost Importance

A WordPress Multisite network allows you to pick a separate theme for each and every subsite. This is partially true for plugins, too — you can “Network Activate” some that are always active while others can be opt-in.

Nothing prevents you from building a flexible theme with adjustable layouts and the like. This is even easier with Gutenberg available now, and large collections of Gutenberg blocks for all sorts of features you may be interested in using.

Back in 2013, we launched a multisite that quickly gained 10,000 businesses (each sporting a subsite). So we had a bunch of themes to pick from. I also worked for a real estate business that crossed 100,000+ installs and we offered nearly a hundred themes to pick from, with a versatile set of widgets and shortcodes and dynamic sections for customizing certain areas of your landing pages.

It gets fairly flexible with the right skill set and initial planning.

6. Some Coding Tweaks Would Be Necessary

The way WordPress Multisite is created allows you to build separate subsites within your network that share common plugins (or even themes) while maintaining different sets of content for each site.

However, multisite networks define a few tables that are “global” for the entire platform.

wp_sitemeta is a database table which resembles wp_options created for each separate site. The site meta table can store information accessible from the entire network.

This way you can pull data from the so-called “central database” shared across the network.

With a bit of coding, you can expand the behavior of your theme or “Must Use plugins” following a similar workflow.

  • One of the automotive multisite networks we’ve built for a known German brand combines slides and news featured by the brand with those created by each subsite.
  • We’ve also designed a “shared media” library with predefined images for each subsite.
  • The front-end templates are also a mix of centralized data controlled by the main site and custom content built by each provider.

From a technical standpoint, it’s definitely possible to build a multisite network using WordPress, such that each website is identical in terms of text, images, and meta-data taken from a central database. Some features are already available in WordPress Multisite. Others may require a bit of custom programming in order to fetch data from different sites or global database tables.

But the underlying framework is powerful enough to accommodate the most popular use cases and you can always create another database table if you have to.

Is WordPress the Ideal Solution for an Enterprise-Grade SaaS?

It depends on the business requirements.

Building SaaS for Business

The CMS is often used as an application framework for mobile and embedded applications, the underlying layer for other front-facing systems, as well as the front-end toolkit for telecom billing applications and even bank statements or reports (aside from the transactional layer itself).

  1. If the business requirements are aligned with the data layer and its corresponding APIs, then WordPress is a great fit.
  2. Does the local market allow for hiring top WordPress talent for ongoing growth? Then, go for it.
  3. If the rest of the technical infrastructure is designed to work flawlessly with a LAMP/LEMP stack, this may be the right pick.

The process of selecting the right SaaS framework takes time. Make sure you use the right tool for the job.

What specific challenges have you encountered in using WordPress for your business? I have discussed the 31 biggest business challenges growing companies face that you can check out to create a powerful business strategy, aside from the use of WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *