In 2020 we introduced a new framework, Laravel, into our tech stack as a way to help clients solve more complex problems than we felt WordPress would be able to.
We asked one of our senior developers, Ralph, to explain more about why we’d choose WordPress or Laravel for a new project:
We love WordPress. We’ve enjoyed using it for years developing all kinds of websites for a wide range of clients with varying functionality needs.
Occasionally, we find situations where we think an alternative approach may be more suitable and rather than taking a “one size fits all” approach, we prefer to consult with our clients to understand their true needs and make recommendations based on that. That said, we are not a “jack of all trades” and you won’t find us making native iOS apps or writing Ruby on Rails anytime soon. We love PHP!
In this blog post we’d like to break down some examples of why sometimes we might choose to recommend an alternative approach to building your website, or web app, what things you might consider and what the pros and cons of each approach might be.
1. Plugins on plugins
Plugins are brilliant. They are a convenient, simple and cost effective way of adding pieces of functionality to your WordPress website. However, with every added plugin adds one extra piece of functionality to test with every core, or plugin update which over the years can grow into a bigger and bigger technical debt if not kept in check.
It could also be an indicator that maybe there could be an alternative route. Maybe this isn’t Laravel, but instead just coding the features you need into your theme or plugin rather than installing a third party plugin with lots of extra features that you are not even using.
Or maybe you are using a membership plugin which has 15+ addons to add the necessary functionality to your site. Often this can be a quick way of getting started, but over the long term can be a headache for you to maintain.
In these cases, we may also consider recommending Laravel, a PHP web application framework that allows us to easily code bespoke solutions from the ground up. Instead of having a membership plugin which requires an addon for a payment gateway, another for user profiles and another for custom HTML emails, etc. it could be a good idea to code exactly, and only, what you need into a carefully crafted web application. Laravel has first-party packages for handling subscriptions and building user profiles and beautiful transactional emails are a cinch.
2. Do you need custom functionality?
A developer can easily build custom functionality into WordPress and very often this is the perfect solution to what a client needs. However, sometimes the requirements aren’t so simple and require a lot of code and architecture to be built up. You may require image processing in the background or critical scheduled jobs that process the day’s data. It could be a forum, but you don’t want to use BuddyPress because your requirements are just a little too bespoke that modifying BuddyPress to that level would just create an unwanted technical debt. Depending on the requirements as a whole will help us and you decide on what approach to take to build it.
3. Do you need a CMS?
One of the absolute best parts of WordPress is the slick, simple and customisable CMS you get out of the box. This is before someone installs a thousand plugins that might then clog up your WordPress dashboard! The dashboard and editing experience when implemented well can be a real pleasure to use and to try to build the equivalent in Laravel would be a very large undertaking.
However, do all websites need to have a full CMS? Sometimes a simple admin dashboard and the ability to manage users is all that is needed. If it isn’t a website so much as a tool or management system of some kind, do you need to be able to edit every single feature?
For a web application such as a project management system, job application system or anything that involves users registering and moving lots of data around, the primary focus is likely to be on how best to structure this data and manage the platform as a whole, not making the homepage, or logo content-manageable. In these cases we would recommend a framework like Laravel.
4. Are you processing lots of data?
One of the primary benefits of utilising a framework such as Laravel, is it giving you the tools to structure and manage your data however you wish. You decide what database is most suitable, you can have multiple databases if you wish, you create the tables and relationships you need to manage your data.
Do you need a scalable API, or do you have a lot of moving parts in your system and need a clean way of laying everything out? In these situations we would most likely recommend Laravel.
5. Can I not have both?
Sometimes you wish to have the simplicity of the WordPress UI for managing your website but also have particularly complex requirements on the functional side of things. A possible solution to this is to have WordPress on a subdomain and use the WordPress REST API to pull content into the Laravel app on the main domain. This gives admins the ability to still content manage the most important things such as posts and pages whilst keeping the main application within Laravel. This can also be done without the WordPress REST API and instead creating a separate database connection directly to the WordPress database from Laravel.
There are upsides and downsides to this approach, which we would be happy to discuss with our clients. The most significant downside is that WordPress becomes more limited in functionality as you lose the ability to install plugins to quickly add functionality as WordPress isn’t the one outputting the content, Laravel is. However, this could also be an advantage as your WordPress admin can be cleaned up to be a simple and beautiful editing experience without the bloat and conflicts from loading a large number of plugins. Laravel can then take care of the complex functionality itself. Depending on your requirements this can be a great solution to a fairly complex project.
6. The hybrid approach
An alternative is the hybrid approach where you have your marketing-focussed website built with WordPress, giving you all the amazing content editing tools that you need and then a separate Laravel web app that becomes your digital product for building functionality. The user journey can be seamless between the two and you benefit from having a great CMS for publishing content, and a great bespoke framework for developing your digital products. This hybrid solution is the one we are seeing the most demand from clients for at the moment. It really is the best of both worlds!
Expanding our offering from just WordPress has enabled us to meet the demands of increasingly complex and bespoke app build client requirements, whilst still harnessing the power of WordPress and utilising the great PHP skills we have in the team.
If you’d like to talk to whether a Laravel or Laravel/WordPress hybrid solution might suit solve your business needs please do get in touch.
Want to know more?
Find out more about how 10 Degrees help solve problems for our clients.