Live data from Hacker News

Corcel – Use WordPress backend with Laravel or any PHP application

github.com

41–50 of 55 posts

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#41
post #39

Earlier quoted context omitted.

After taking a quick look at your e-commerce site, you could simplify it further without compromising performance over personalization/technology stack if you have alternative options especially minimal codebase and CDN friendly.

You are right, I should completely move out of Woocommerce and exclusively use Laravel + Filament + LunarPHP or even use hosted Shopify and decouple myself from the tech stack. At the same time, a day job and raising kids can make major technological transitions a real challenge. So, we are here, still stuck between 2 systems.

I once did that for a client of mine.

I took the WordPress-based / WooCommerce system and split it into 1) the Shopify system for admin stuff and also the whole payment system and 2) the "frontend" i.e. the consumer facing part BEFORE the payment (I used Symfony, similar to Laravel, but more modular and I was more familiar with it). Theoretically you could fetch all the product data via the Shopify API and then sync it automagically. But in the first iteration, we just copied some of the basic product data into a simple Symfony Admin backend and made a simple javascript-based checkout slide-out, and only when they were ready to pay, they would be forwarded to Shopify.

This way we would have full control of the user experience up to the point of purchase, and then Shopify would take over. I thought this was the best way I can deliver a performant website, while also being able to sleep well, because all the money stuff and all the customer data is handled by Shopify.

I was able to increase search engine traffic by 30% this way, reduce page size and increase page speeds and revenue increased significantly.

After 3 years, he decided he wanted to make it more "professional", so he fired me, I got none of the credit ("the search engine traffic must be because of better branding - and the page isn't up to my standards of aesthetics... yes, the designers who were supposed to deliver the designs kept stalling and delivered NOTHING and you had to just create something on the fly before the main selling season, and yes we had huge sales gains on the website and more traffic, but this was not because of the website"... they didn't change any of the marketing or any of their strategies, by the way.) So they hired an agency team with a project manager, designer, developer, marketing person; who then asked me to give them the source code from git so they can upload the code to their FTP server (!).

And they pretty much didn't change anything for a few years, everything looked the same. After like 4-5 years, they adjusted the design a bit, but still looked VERY similar.

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#42
post #40

Earlier quoted context omitted.

Sandly, Automattic / WooComm is responsible for such thing. For example, the product gallery is such all images - thumbs and main slides - load on page load. If you don't click any thumbs - and had 10 total images - 9 would have loaded for naught. But there are BE + FE ways to fix that :) Also, WooComm recently introduced HPOS that moved order meta into its own table. Smart! But there is still order data captured for…

The real issue is that customers without knowledge are asking explicitly for wordpress instead letting us techs give the best advice.

Most techs give terrible advice.

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#46
post #40

Earlier quoted context omitted.

Sandly, Automattic / WooComm is responsible for such thing. For example, the product gallery is such all images - thumbs and main slides - load on page load. If you don't click any thumbs - and had 10 total images - 9 would have loaded for naught. But there are BE + FE ways to fix that :) Also, WooComm recently introduced HPOS that moved order meta into its own table. Smart! But there is still order data captured for…

The real issue is that customers without knowledge are asking explicitly for wordpress instead letting us techs give the best advice.

On the other hand, most techs are bias. That is, the tool they know is always the best solution, whether that's true to not.

Yeah, perhaps there are times when WP isn't the ideal choice from a pure technology POV, but there's more to it than that. For example, most (solo) devs complete dismiss the "getting hit by a bus" test. Sorry, but no one should accept advice from anyone who dismisses that test.

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#48

How's Corcel different to using WP's own API? What are the pros / cons?

A direct database connection means almost all of your queries will work without any error handling. Using an API requires you to handle lost connection every time you make a request.

Direct database connections almost always are orders of magnitude faster, especially when joins are involved.

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#49
post #39

Earlier quoted context omitted.

After taking a quick look at your e-commerce site, you could simplify it further without compromising performance over personalization/technology stack if you have alternative options especially minimal codebase and CDN friendly.

You are right, I should completely move out of Woocommerce and exclusively use Laravel + Filament + LunarPHP or even use hosted Shopify and decouple myself from the tech stack. At the same time, a day job and raising kids can make major technological transitions a real challenge. So, we are here, still stuck between 2 systems.

Ah, if between the 2, perhaps, Astro web framwork is what I could build a small e-commerce quickly with minimal code in TypeScript, Tailwind and lots of copy and paste UI. Prior to Astro, I was spent months solving the differences codebase on frontend and backend. So anyway, we are in the same timezone.

Re: Corcel – Use WordPress backend with Laravel or any PHP application

#50

This is a good mid-migration step but I'm not sure the WP database design is of particular merit otherwise. (This is speaking as someone who just migrated a site TO WordPress because it was still better than the previous system...)

Agreed. Presumably people want to keep years of posts and pages plus the familiar admin interface.
Post reply on HN