WP2Static by Leon Stafford


Developer Leon Stafford has built a security and performance plugin for WordPress called WP2Static that will convert your database-powered website into static HTML. Leon has a lot of great thoughts on the benefits of static websites, the use of caching plugins with WordPress, providing high-value support, giving back to the community and a whole lot more.

Can you tell me a bit about yourself and how you became involved with WordPress?

As much as I used to mock the term, you’d now describe me as a digital nomad. At 20, I left Australia for eight years in Japan followed by about seven years living between China, Hong Kong, the Philippines, and New Zealand. I am now doing a month with my kids in Chiang Mai, Thailand.

I grew up around computers but never touched code until my early 20’s. Working in Japan, I was given a book on PHP and entered the crazy world of internet marketing. After a bit of time developing Flash apps, backed by PHP, I wound up doing client work on WordPress. I then moved on to Python and Ruby projects, developing a career in Software Test Automation and DevOps, before this return to WordPress.

What was the motivation behind you starting to begin development on WP2Static?

This was about eight years and several countries ago now so it’s hard to remember the exact moment of conception. I was working on client sites (people with 500+ domains, making their millions with ad clicks) and I just saw static sites as a simple solution to the security and performance challenges at the time. Unfortunately for the industry, the plugin is even more relevant today with WordPress security and performance still major concerns for many.

The plugin chugged along after its creation for many years with over 5,000 active users. About 12 months ago I started improving the plugin as I wanted to spend more time on open source projects. Six months after that I was in a job my heart wasn’t connected to and saw people monetizing WordPress plugins. I decided to go for it and try to sustain WP2Static’s continued development through a premium version.

WP2Static's Deployment Screen
WP2Static’s Deployment Screen

What were some challenges you experienced building WP2Static that might be interesting to other WordPress plugin developers?

I love technical challenges but the personal and financial ones were the harder ones to endure once I decided to focus full-time on WP2Static.

For WordPress plugins, I’d say the hardest are the limitations you have when you can’t control the environment your plugin is installed on. This means creative testing and solutions to things like PHP execution time and memory limits on shared hosting. You often dream of running a SaaS just to control the platform!

Ashley Rich, of the great Delicious Brains, wrote a great WP Background Processing library and many backup plugins use variations of WP Async to keep long running tasks alive. Whilst planning for this, I opted for a different approach, which uses flat-files as message queues with the browser keeping things alive (when not running the plugin via WP-CLI). It works well for WP2Static’s use case, with performance benefits, but is not something you’ll likely read about in WordPress dev docs or tutorials.

Can you talk a little bit about why caching plugins, a common solution in WordPress, just aren’t good enough compared to a static website?

Caching plugins are very mature and in some cases may be your best option due to constraints. Where WP2Static, or any other WordPress to HTML solution, can have advantages are:

  • Security. The appeal for many WP2Static users is not worrying about server security. Caching doesn’t solve the problem of unaudited plugin or theme code.
  • Caching plugins can reduce server load but not speed up your DNS resolution or deliver your site to all global users at lightning speeds. CloudFlare can really help with this but isn’t a silver bullet. You still need to choose which pages are cached and when to invalidate.
  • A cache-miss will still take a toll on your server. For sites with 30+ plugins and horrendous load times when not hitting cache, anytime you get a bunch of cache misses for whatever reason you may still be turning away users when your site is not loading fast enough. Granted, you should still optimize your site to load quickly, regardless of caching. But when you’ve deployed a static copy of the site you can be absolutely certain of your page load times.

Caching is always a challenge: what to cache, for how long, when to reset cache. It’s still a problem with a static site to some extent but the control is very much in your hands.

WP2Static's Crawling Options
WP2Static’s Crawling Options

What have been some of your most successful marketing efforts?

Elegant Themes surprised me by publishing a guide on how to use WP2Static with Divi last year. At the time, I was quite anxious about the state of the latest release and eager to get an improved version out. It was bittersweet to get in a lot of traffic. Hopefully, I didn’t turn off too many users with their first impression of a clunky plugin.

Every so often, I post on Reddit. I tried paying for ads there and it was OK but I’d rather avoid having to pay for ads and competing with those who have bigger pockets to do so. I believe the plugin has enough merits to stand on and I’ll just aim to always be vocal about it being a good solution as much as I can whilst avoiding crossing the line of being spammy.

I’ll jump into threads on Twitter or Reddit where people are pissed off with their hosting company, have been hacked or looking to switch to JAMstack from WordPress. I’ll offer them the solution that WP2Static or any WordPress to static website solution can give them. It’s still a relatively unknown solution so at least helping them be aware of it gives them another option to consider and is usually well received.

WordCamp Brisbane in October was my first speaking event generally covering WordPress as a static website generator. I’ve got some other static related talks lined up for WordCamp Jakarta in February and WordCamp Cebu in March, which is where my fiance is from and has often been my home. I just got my submission in for WordCamp Europe 2019 with the talk “Going static to solve WordPress hosting issues.” Fingers crossed that I’m approved as I’ve never been to Europe and have a lot of users and friends from the online community it’d be great to meet with in real life. I think these and other speaking events help raise awareness of static sites for the WordPress crowd.

You have the same pricing strategy that I use for my own plugins: a one-time fee. How did you settle on this pricing approach for your add-ons?

Well, I certainly explored many pricing options over the six months or so since offering the premium PowerPack option to users. There’s a lot of data suggesting what I can charge people and that recurring makes more money because people forget they are paying for things, etc. In the end, I went with what I feel is a good price that I would be willing to pay. $30 for a piece of software, to use anyway you like, with no quietly recurring payments or forced payments for a new license each year. Just because you can sell your product for $499 doesn’t mean you should. It’s personal ethics/beliefs and how I want to inspire the industry, “be the change”, etc. I’m mission-first, money-second so probably not the best person to follow for plugin pricing if you’re just trying to make money.

A lot of people warn of the cost of supporting users like you have to bake that into the price and budget $n for it. I believe that support costs can be mitigated by handling as much support as possible in the public forum. This way you answer the question once for one user and others can then ideally help themselves.

If you have a lot of support load it’s probably time to improve your product. UX/design thinking can help prevent people from needing support in the first place. Better documentation and tutorial videos can also make a big difference to the amount of support requests you are getting and something I’m focused on for this year.

Every support request is not necessarily a cost to the company. It’s free feedback from real users. Embrace it!

Lastly on support – there are many companies who make their big bucks then plan a Corporate Social Responsibility program or donate some money somewhere for good will. I think that by changing the mindset to giving free support as part of being a company that cares about people using their software you can make for a more wholesome business from the start.

WP2Static Pricing
WP2Static Pricing

I ask everyone this question: What do you wish someone had told you before you started working on the plugin that would have been useful in hindsight?

I wish someone had just encouraged me to go for it. I’d been building software for other people for many years. I knew a lot of what was required but lacked the confidence to go for it.

Justin Jackson, of MegaMaker and Transistor fame, was an early customer of WP2Static having sponsored the initial GitHub Pages deployment feature development. Subscribing to his newsletter out of curiosity, his motivational words for developers to be better marketers and business people certainly hit home for me on many occasions and helped keep me going.

I’m by no means financially stable with the plugin sales today but would still encourage people to work on passion projects. The feeling of your software being someone’s solution can be more fulfilling than a large paycheck. If you can somehow get both of those things at once, w00t!

What does the future hold for yourself and WP2Static?

WP2Static will continue to develop and no doubt more users will appreciate the benefits of static sites in the next few years. We see trends come and go on the internet and I don’t imagine WP2Static will need to exist in 10 years time. But, if it does, it’s a completely open source project so if I’m not maintaining it the WordPress and open source communities will hopefully be keeping it relevant.

My passion is around low-resource and low-cost computing in empowering people and increasing efficiencies. WP2Static gives me some opportunities to help people host for free, automate their WordPress workflows and avoid powerful servers, so I get to scratch that itch a bit.

I’ve been learning OpenBSD and UNIX core utilities of late and want to get out more doing workshops and screencasts to help people learn these really solid tools that are free. I want to help people who weren’t fortunate to have had the financial and circumstantial opportunities that I did. Seeing them using free and open source tech to build great things for society would be a dream come true and something I believe I can influence.

After shaking up the WordPress hosting industry by removing the need for many to pay for overpriced hosting services, I want to move on to other things people commonly overpay for. Whether due to convenience or having been aggressively marketed to, there are so many technologies that with a little investment in skills the same results can be had for free. Less money spent on things we don’t need means less hours we need to work and more time for focusing on the important things in life.