Using WordPress as a SaaS Platform with OptinMonster

2,699 views

Published on

This presentation highlights our journey of using OptinMonster as a SaaS (software-as-a-service) platform built on top of WordPress.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,699
On SlideShare
0
From Embeds
0
Number of Embeds
1,246
Actions
Shares
0
Downloads
7
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Using WordPress as a SaaS Platform with OptinMonster

  1. 1. Thomas Griffin https://thomasgriffin.io 1 Using WordPress as a SaaS Platform By:Thomas Griffin (@jthomasgriffin)
  2. 2. Thomas Griffin https://thomasgriffin.io 2 Who am I?
  3. 3. Thomas Griffin https://thomasgriffin.io 3 I am a partner and CTO of Awesome Motive, Inc. and the technical Co- Founder of OptinMonster. Prior to OptinMonster, I founded Soliloquy, the fastest WordPress slider plugin, and Envira Gallery, a revolutionary gallery solution for photographers. I also builtTGM Plugin Activation and serve over 30,000 happy customers. Thomas Griffin
  4. 4. Thomas Griffin https://thomasgriffin.io 4 To improve is to change; to be perfect is to change often. Winston Churchill
  5. 5. Thomas Griffin https://thomasgriffin.io 5 History of OptinMonster
  6. 6. Thomas Griffin https://thomasgriffin.io 6 The OptinMonsterTimeline We meet to discuss the awesomeness that would become OptinMonster. OptinMonster is Born We failed to build a SaaS model, so we pivoted to a WordPress plugin.Totally worth it. OptinMonster Launches We moved from an MVP to a rock-solid v2.0 release, building a very feature-rich platform with even better technology. OptinMonster 2.0 Lands Our customers are demanding solutions outside of WordPress, so we hit the ground running building the hosted platform. OptinMonster…SaaS? Jan. 1, 2013 Sept. 24, 2013 Aug. 24, 2014 Oct. 8, 2014 May 5, 2015 The OptinMonster hosted platform launches, allowing OptinMonster to be used on any website. OptinMonster App
  7. 7. Thomas Griffin https://thomasgriffin.io 7 The Moving Process
  8. 8. Thomas Griffin https://thomasgriffin.io 8 Epic Considerations •Data Migration •Scaling •System Architecture •Security •Payments •Onboarding •Support •Caching •High Availability and Redundancy •Interfaces •User Experience •Development Workflow
  9. 9. Thomas Griffin https://thomasgriffin.io 9 Practical Applicationÿ
  10. 10. Thomas Griffin https://thomasgriffin.io 10 Over 7 billion requests served since 2013.
  11. 11. Thomas Griffin https://thomasgriffin.io 11 500 million requests served last 30 days.
  12. 12. Thomas Griffin https://thomasgriffin.io 12 5 million leads generated in last 30 days. (That’s a bunch of requests to email service providers)
  13. 13. Thomas Griffin https://thomasgriffin.io 13 And WordPress handles all this??!?!?! YES!
  14. 14. Thomas Griffin https://thomasgriffin.io 14 Meat and Potatoes
  15. 15. Thomas Griffin https://thomasgriffin.io 15 Database •InnoDB preference over MyISAM •add index to wp_options autoload •use persistent object caching with Redis to prevent extra queries
  16. 16. Thomas Griffin https://thomasgriffin.io 16 Users <?php wp_*_current_user() *_user_meta() •start with simple subscriber user, strip permissions, add caps from here •custom data keys for account access using user meta
  17. 17. Thomas Griffin https://thomasgriffin.io 17 Optins •custom post type for handling each optin •custom data storage using JSON (https://thomasgriffin.io/wordpress- performance-outside-box-handling-retrieving-data/) •custom AJAX requests for saving and generating data •public output generated at save and update intervals for performance
  18. 18. Thomas Griffin https://thomasgriffin.io 18 API Requests •scaling API requests (https://thomasgriffin.io/a-creative-approach-to- efficient-and-scalable-wordpress-api-endpoints/) •this solution works for admin-ajax.php requests too! (https:// gist.github.com/thomasgriffin/11b859f0531a812bb273)
  19. 19. Thomas Griffin https://thomasgriffin.io 19 API Requests <?php /** * Plugin Name: Custom admin-ajax.php Helper * Plugin URI: https://thomasgriffin.io * Description: Whitelists the plugins to be loaded during admin-ajax.php requests for performance. * Author: Thomas Griffin * Author URI: https://thomasgriffin.io * Version: 1.0.0 */ ! // Check against the request URI. if ( ! isset( $_SERVER['REQUEST_URI'] ) ) { return; } ! // If it does not match the admin-ajax.php route, do nothing. if ( strpos( stripslashes( $_SERVER['REQUEST_URI'] ), 'admin-ajax.php' ) === false ) { return; } ! // Ok, this is an admin-ajax.php request. Filter available plugins. add_filter( 'pre_option_active_plugins', 'tgm_whitelist_admin_ajax_plugins' ); function tgm_whitelist_admin_ajax_plugins( $plugins ) { ! // Only modify the ajax requests performed by our own plugin. $action = isset( $_REQUEST['action'] ) ? stripslashes( $_REQUEST['action'] ) : false; if ( ! $action ) { return $plugins; } ! // For this example, we will target the heartbeat ajax request. if ( 'heartbeat' !== $action ) { return $plugins; } ! // Prevent any plugins from loading during the request. $whitelist = array( // my-custom-plugin/my-custom-plugin.php ); ! // Return the whitelist instead of the default plugins. return $whitelist; ! }
  20. 20. Thomas Griffin https://thomasgriffin.io 20 Caching •literally cache everything with persistent object cache (preferably Redis) and fastcgi cache with Nginx •this makes 99.9% of requests hit cache •minimize impact of non-cache hits to DB
  21. 21. Thomas Griffin https://thomasgriffin.io 21 Infrastructure •we love Pagely! •custom setup on AWS using ec2 load balanced instances, RDS (database), Route 53 for DNS, Elasticache w/ Redis •smart cache purge policy on updates and save requests •utilize MaxCDN for images and API script requests
  22. 22. Thomas Griffin https://thomasgriffin.io 22 Development Flow •absolutely everything starts on local! •marketing and app site split into two separate installs •staging and production environments •git feature branch dev - (http://nvie.com/posts/a-successful-git- branching-model/) •custom vagrant boxes for easy dev on boarding
  23. 23. Thomas Griffin https://thomasgriffin.io 23 Support •all requests through HelpScout - easy ticket sharing, notes, workflows •integrated with Gravity Forms to automatically tag and segment requests •TONS OF DOCUMENTATION •fuzzy search and user “creates docs for us” •happiness reports to identify trends, ways to improve
  24. 24. Thomas Griffin https://thomasgriffin.io 24 Support
  25. 25. Thomas Griffin https://thomasgriffin.io 25 Notifications •simple notification system for in-app updates •custom post type and user meta to check for view state •pulsing dot to notify users of new notifications
  26. 26. Thomas Griffin https://thomasgriffin.io 26 Jobs and Queues •daemons and workers to handle intensive, long processes •utilize redis + job queues to prevent server overload •useful for monthly conversion reports, platform data insights
  27. 27. Thomas Griffin https://thomasgriffin.io 27 But the most important ingredient…
  28. 28. Thomas Griffin https://thomasgriffin.io 28 YOURTEAM!
  29. 29. Thomas Griffin https://thomasgriffin.io 29 Processes and systems help, but your team makes the difference.
  30. 30. Thomas Griffin https://thomasgriffin.io 30 So WordPress…Worth It?⋆
  31. 31. Thomas Griffin https://thomasgriffin.io 31
  32. 32. Thomas Griffin https://thomasgriffin.io 32 That’s all, folks!

×