Dashboard
Back to Articles

Why we migrated from Wordpress to NodeJS

Written by Hayden Falzon author image Hayden Falzon

Published on Updated on
Reading time: 13 mins

Here we go again

I started this site 4 years ago with little to no knowledge in the area of web development. And only 2 years ago I released it as a WordPress blog.

In those 2 years I have rebuilt the site... 3 times...

Now for those of you who are familiar with web-development... you may be pulling your hair out at that statement.

You should hardly have to rewrite once, let alone 3 times. So why did I do it? How did this calamity come to be?

Was it because I was stupid? Well... maybe...But to be honest I think it is because I didn't know, what I didn't know.

The Wonderful Terrible World of WordPress

This site started its journey as a WordPress blog.

I was recommended WordPress by a friend, for its ease-of-use for beginners.

I was asking around at the time, how one might build a website? I had very little money to my name, and frankly even if I did, I like to penny and dime.

How hard could a website be?

My friend told me that WordPress with the Unicon theme should serve all my purposes...

Now I want to be clear I am very thankful to this friend, as I do not believe I would be where I am in regards to my knowledge if I had started elsewhere.

BUT

WordPress Sucks***

  • *** If you try and use it for what it isn't designed to do.

WordPress is for blogs - Don't try and make it a web-app!!!

For those of you who do not know, wordpress is a CMS that is geared towards blogging. However, due to an extremely rich community, it has a plethora of ways to turn your blogs into anything you could imagine.

The only problem is that doing so is a terrible idea!

And I know, because I have done it 3 times now...

Lets not get to ahead of myself in this story

I remember watching my first ever tutorial on WordPress and being so lost and confused by everything happening.

Questions plagued my mind with everything that was said... and the more I uncovered, the more questions I had.

  • What was "DNS"?
  • What is "MYSQL"
  • Is MySQL different than MariaDB?
  • Which Host should I use?
  • Is WordPress the best choice?
  • How can I add functionality that I want?
  • How can I get people to signup and have an account?

It was so overwhelming to make a website

And I almost didn't even try due to the overwhelming nature of it all.

Here I was... a would-be story teller, apt in 3D and film-making... trying to spread myself too thin, and create a website for those people, who like me. Were on a journey to tell stories.

But I did anyway. Because I had an idea, I had a vision. And I am a sucker for punishment apparently.

WordPress Plugins For Everything!

One of the first things any new WordPress developer will do is find a plugin that they think will comply change their site.

For me I started on Envato purchasing plugins that suited individual parts of the functionality that I wanted.

(Don't do this by the way, why envato does have some gem's among the rough, most are not of a quality that I would feel comfortable using on a production site.)

This was an incredibly bad idea!

At the time I didn't realise that plugins were not plug and play usually.

They were all made by individuals or companies that didn't really communicate. So if you tried to load more than 2 plugins that operated in roughly the same area, things probably wouldn't go so well!

25+ Plugin Monster

The first true realisation of Polyfable was something of a monster.

I still have the source files and a local copy of it too!

I had a Plugin for Everything (And not the cheap sort either!)

In my mind, you had to Pay for Quality... unfortunately when it is built on WordPress the quality doesn't really matter as the skeleton is a bloated mess.

The main big plugins included:

  1. Memberships:
    • Restrict Content Pro
  2. User Accounts:
    • Profile Builder Pro
  3. Store:
    • WooCommerce
  4. Downloads
    • WooCommerce S3
  5. Forms:
    • Ninja Forms
  6. LMS:
    • LearnDash
  7. Custom Code Intergrations (Triage)
    • Code Snippets
  8. Gamification
    • GamiPress
  9. Secruity:
    • WordFence
  10. Theme:
    • Oxygen (I actually will 100% recommend this one, the rest... not so much)

And these are just the BIG ones... There were an assortment of smaller plugins. Some child plugins for the larger ones... For example GamiPress, the gamification plugin, had plugins for each of it functionality.

I feared every single update because I knew something was going to break! And I would have to triage it with custom code, that either, changed something via a hook, or stopped it from loading entirely...

Bloat Bloat Bloat!!!!

With such a system in Place bloat was... well... it was everywhere!

You see, plugin authors need to make money, so they will make their plugin general in nature. It will be able to do a lot more than you need it to do. Which can be great, especially for general use-cases and you are only using 1 or 2.

But when you scale this up to the numbers I had... it was a behemoth of a website.

So should you create a WordPress site with more than 5 plugins?

NO!!!!!!!!!

WordPress plugins, are what I think lead a lot of business creators and bloggers to the platform. There is something tantalising about the idea, that I can just install a plugin, and presto... I have an e-commerce website, or LMS...

Unfortunately, in practice, that isn't how it works. So don't be allured by this poisoned fruit... if you are not sure what you are doing.

My rule of thumb is now to limit yourself to 5 plugins. If your site requires more... rethink your site or start learning to code!

My Journey into CODING!

Code... a dreaded word. At least for me. I did everything I could to avoid it.

Everything from:

  1. Learning No Code Solution
  2. Using Plugins
  3. Using Webhook Plugins that abstracted API calls (Though at the time, I didn't know it was doing that)

Here I was stuck with a website that I hated... I hated everything about it.

And I couldn't see a way out... at least... not with the skills I had.

But during my time fixing the innumerable bugs caused by Updating my many many plugins. I began to dabble in PHP... a mystical and arcane language to me at the time.

With every update I would look at more PHP code... And every time I looked at the strange symbols that spread across my screen... I started to understand it more, a little bit every-time.

About 6 months of terrible updates, and triaging... I threw the towel in...

How hard could it be to turn 25 plugins into 1 custom plugin and 1 theme...

I thought to myself. Naively.

Thus I began on what would turn into a year and a half of learning while developing. 1 LMS plugin and 1 Theme

This was one of the worst, and single best decisions of my life. During this time, I was forced to learn so many new skills and a whole new way of thinking...

Not because I wanted to... because it was necessary "No, it's necessary" - Interstellar Docking Scene - 1080p HD

As that is where I find that I learn the most effectivly. When I have to learn something. Do or die.

At the end of this endeavour I was able to strip down the number of plugins from over 25 to under 5 + 1 Theme

  • Custom Coded LMS which Handled
    • Downloads
    • Permissions
    • LMS
    • User Accounts
    • Gamification
  • Custom Coded Theme which handled:
    • Auth/Login
    • Styling
    • Navigation
  • WooCommerce
    • Striped out most of its features and used it as a glorified Database interchange layer and for it's in built cart system
  • Custom Coded Payment Gateway integration
    • Payment Gateway that integrated with WooCommerce
  • Ninja Forms
    • Basic Forms
  • WordFence
    • Security

Now that might sound fantastic... And I was... am... proud of this accomplishment.

However even this was... Well... Problematic.

The Main issue with WordPress

The main issue you see, wasn't the plugins now... It was WordPress itself.

WordPress in a nutshell is a rather... archaic system now. How you go about accomplishing things are usually in a very "WordPress" centric way.

While I had learned to code, more or less, it was still very oriented towards WordPress Way of Thinking. Which is a little different than other frameworks. (As that is how I was using WordPress at this point, I was using it more like a Framework)

I often times felt tired, and like I had to battle my code in order for anything to work.

Then I realised somthing... As much as I respected PHP... I didn't actually like coding in it. It felt... well... hacky at times, it had all these really lovely features, but they felt tapped on to an already legacy way of doing things. In a word. The language also felt archaic. But even that wasn't the biggest issue. The biggest issue was the lack of support from modern SDK's and poor documentation surrounding the ones that did exist.

Getting Google and AWS sdk's to work with PHP was... not fun.

Enter Javascript

Now I hear the yells! How can I go from PHP to arguably an even more hacky language. I hear you! Javascript does at times feel archaic.

But my my my... Is the documentation clean!

I felt so much more in control of the code, despite the callbacks and the async. I understood it for the most part.

I liked it!

Now, I want to be 100% honest, I had been dabbling with Javascript on the frontend of my PHP application for a while now, and I had recently started using frontend Frameworks like Alpine on WordPress.

Using these really opened my eyes as to what was going on in Javascript Land. It felt amazing! It was so powerful! And best of all... it was supported! There was documentation every where.

Lessons Learned

During this journey I have gone from creating a simple WordPress blog to a WordPress Plugin spaghetti mess held together by sheer will, to a custom WordPress development with custom DB to finally a JAMSTACK deployment.

  1. WordPress blog
  2. WordPress LMS -> A 25+ Plugin Monster
  3. WordPress as a Framework -> A Lean Mean website that still caused me headaches
  4. A Static JavaScript decoupled application (Frontend, Backend and Application are separated)

Not the most ground breaking development there.

But I feel that it may be interesting to hear my journey especially to those who are on a similar path of learning and developing as you go.

Now I will cut to the chase and say... my current solution isn't perfect.

None of them are!

And this is true for any stack you choose to move forwards with. But it is more suited to my needs than my original iteration of my site. And that is good enough. There is a great saying that pops to mind as I write this.

Perfection is the enemy of good!

Never

Ever

Try and over-engineer something.

This is true for 3D, game development and websites.

If it works... it works...

My Current Stack

My current stack is such a joy to work with. I feel so much more liberated and flexible in terms of choosing my technologies moving forward now that everything is separated.

Now, I could go out on a limb and name my stack something edgy - like FAST (fastify, astro, svelte, turso) stack or something like that. But there are a lot of other layers that make this stack tick and I don't feel that giving it a name really reflects it value for my work.

At the end of the day - pick something that works for you and your goals!

Frontend

  1. Astro - For public facing site
  2. SvelteKit - For LMS Application
  3. Clerk - For Authentication

Backend

  1. Fastify - For backend API
  2. Turso - For Database (SQLite/LibSQL)

Perfection is the Enemy of Good

One thing that changing my site so many times has taught me is that you should not let attainment of perfection be your primary driving force, as just like with the speed of light, the closer you get, the further and less attainable it will become.

No...

Instead you should focus on the question - Am I able to achieve my goals with my current knowledge and technology.

I have done things - no developer should ever do! From writing 105 XMLHTTPrequests - to having a 10000+ line long JS file in my src because I thought it would be easier than having a build step to join all JS scripts together.

Because I am an idiot (Sometimes...)

I had nearly 25+ plugins on the WordPress site once upon a time... loosely coupled with hooks and custom PHP... PHP - at the time, I had no idea what it was doing???

I have made some stupid decisions in retrospect, but honestly. I wouldn't go back on any of them. As I have learned so much from this journey. The only thing that I would change, is how fast I realised my mistakes....

Fail fast!

There comes a time in every web based business where they are at a crossroads. Do they build on what they have, or do they tear it down and start from scratch?

In the case of Polyfable this has occurred 3 times! Each one coming with the expanse of my knowledge.

We started as a simply WordPress blog, hosted on fastcomet.

Now we are a static web app with a focus on client side fetching hosted on a multitude of different services. While we have most certainly increased the complexity, we have, paradoxically reduced the mental strain the site was having on me, by breaking it up into mutiple parts, each working togeather to form a whole.

I hope you enjoyed this rather ad-hoc preview into this sites journey - and I hope that you come away from it, not feeling down, but inspired to create. On Wordpress, NodeJS, Webflow... whatever... stick to your vision and never give up.

The Future

While I am very happy with my current stack for Polyfable, I have been eying of another language for some of my other projects. That language is Go.

Moving forwards, I am going to use Go on the backend over JavaScript for more mission critical application. The reason for this descion is nuanced and personal. But it basically boils down to being the right tool for the job for me. Perhaps I will write another article like this about why I am leaning more towards go for my next applications.

Author Avatar

Hayden will tell everyone that he is not a programmer, game developer, educator, artist, 3D modeller or animator... instead, he tells people he is a storyteller.

Graduated from the Australian Film Television and Radio School (AFTRS) Bachelor, Hayden has been proactive in fostering a multidisciplinary outlook on digital storytelling across all of its mediums.