Coconut Tickets WordPress to Laravel Migration – part 1

Part 1 – Introduction

I love WordPress and have used it to deliver literally hundreds of websites for my clients, but after I built my first commercial website in Laravel I was taken aback by how productive it was and I thought hard about why I had relied on WordPress for so long.

Before any WordPress fans switch off, let me explain that my domain of expertise is really in building web applications, especially those which process transactions such as booking engines. This is somewhat outside the mainstream use of WordPress for building informational websites or blogs.

My team built the event ticketing platform Coconut Tickets using WordPress. The ticketing engine is a huge bespoke WordPress plugin that implements the event ticket Software as a Service (SaaS) platform. In the beginning I had thought of building it as a pure PHP application but my experience with WordPress taught me that we could deliver it faster using the tried and tested framework of the WordPress platform together with any public plugins that might save us building something that was already written and working successfully on thousands of other websites. Also, I knew that Coconut Tickets would have public pages and blog pages for which WordPress would be a real time saver compared to crafting those pages by hand.

With the concept of Coconut Tickets now proven on WordPress, towards the end of 2018 I decided that we would migrate Coconut Tickets to Laravel. This was quite a change in strategy because I was originally thinking that the next stage could have instead been a rewrite in a completely different technology such as Node JS.

The advantages I was aiming for migrating to Laravel included:

  1. Faster development of new features and reduced maintenance by writing less code. Using Laravel as framework for supporting application development instead of the considerable bespoke code needed for our WordPress plugin.
  1. Easier exploration and testing of functionality (e.g. using Tinker) which we would otherwise have had to build into a web page to test in WordPress.
  2. More flexible web page URL routing (needed for ticketing mini sites).
  3. Simpler page building and formatting with Laravel view blades (no equivalent in WordPress)
  4. Existing subscription functionality (Laravel Cashier) on which a new subscription manager could be built.
  5. Easier to write database queries with Eloquent ORM rather than writing SQL in WordPress.
  6. Long term scalability opportunities by using the Laravel framework that makes it easier to build for micro-services than WordPress ever could.


This looks like a huge project, but both Laravel and WordPress are PHP based. This was important because it offered that exciting possibility of migrating a large amount of the Coconut Tickets plugin code to Laravel without having to re-write it from scratch. Saying that, we knew that the re-testing of the website and all its associated ticketing services would be so time consuming that it would make sense to bite the bullet and make some other improvements at the same time. This led to a decision to deliver the migrated application to use the latest Bootstrap 4 HTML UI components from the Bootstrap 3 components that our WordPress plugin was using. This decision probably doubled the time to migrate to Laravel and increased the stress but has improved the long term maintainability of the event ticketing platform.


In the next post I will explain the strategy behind the migration. Including what we decided to do about testing, JavaScript code and database tables.


Leave a Reply

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

Join our mailing list Get great tips and ideas on selling event tickets and vendor pitches online