Over the last few months, I was tasked to create an administration portal. The portal was a key step for the company’s next move in bringing in new customers but to also allow existing customers a new active role with their accounts.
As with any WordPress developer, your first thought is how can I do this with WordPress? In the past, I’ve experimented using an MU or WordPress network setup for hosting websites. It worked really well in my case as I controlled the theme (sweetness), plugins, and environment. At the time, I had roughly 25 smaller customer accounts on it with zero issues. Every site used a child theme and I believe I had about 30-40 plugins installed, not necessarily used on each subsite, but a majority being my public and private plugins. The media library was offloaded to Amazon S3 so local storage was minimal. After the experiment, I did end up breaking them up and restoring them to their individual states.
Fast forward to the current project at hand. I needed to outline how the portal would be used and the requirements. The main focus of the customer accounts was to allow management of their content and a way to feed the content to our other external properties, one being Partners Local, and to their personal website.
The second goal was to make sure the customer could access their information freely and be able to maintain their content. This reason alone pushed me into deciding the best route would be to use WordPress Multisite. Now before you jump on me and say… “But Kerry, there are numerous ‘membership’ plugins”. Here me out…
Project Needs
- I’m not talking about the customer needing to edit a custom post type or a single page. There are, as of today, over 10 different services that we provide our customers and each of them, to some degree, should be editable by the customer.
- Easy billing display. Our billing is handled with Stripe and turns out made me learn how to use their API and build a Stripe API wrapper.
- Ability to disable the account easily and all API routes.
- A private media library for each customer. This was probably the most important.
The last one above, media library, was the sticky point. With having 10 different content services, the customer would need a stable and private media library. In addition, you don’t want them to see other customer’s services and media.
How it Works…
In a multisite network, each subsite is a complete isolated website within the admin, this includes all post data, media library, and users. This works perfectly for our purpose. A private media library – check. Easy access to service post data and information – check. Ability to have additional users from their business accessing their account – check, billing showing current subscriptions, update credit card, add subscriptions – check.
Each subsite or account is set up in a way that services are only available if the customer is using them. This includes access to content specific for Partners Local, content that could be displayed on their website, billing, and reports such as Google Analytics, Adwords, and Callrail.
Making the information accessible to external sites
With my recent success in working with the Rest API when building the current version of BNE Testimonials Pro, the WordPress Rest API has become pretty standard in my workflow. Each service or area of the customer dashboard can be retrieved using the API. Then on the customer’s website and our other properties we can make a GET
request to the API endpoint and display the data. All sites and widgets viewing the API will always have the latest version of the content, making the whole process a success.
Again, one of our goals was content maintainability. Having to update the same information over and over in multiple websites or even within the same website is a hassle and error-prone. Just take displaying office hours as an example. It’s over here in a sidebar widget, in the footer, on a static page with a form… you get the idea. Now the customer, or at their request, can update this information in one step.
There are many, many, reasons a Multisite set up can be used and, of course, the same number of reasons to avoid it. A careful outline is key when going this route and must be fully thought out in execution. Now our customers can view reports, update and or view coupons, portfolios, business information, office hours, contact information, badges, reviews, Google reports, Call tracking reports, update their listings, and approve content writing.