Live data from Hacker News

Corcel – Use WordPress backend with Laravel or any PHP application

github.com

31–40 of 55 posts

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

#31
post #17

Corcel has worked great for us, even in a production environment. Our family's e-commerce business previously had a slow and bloated WooCommerce site, largely due to my skill issues. However, we were able to rescue the site by using Corcel, Laravel, Filament, and LunarPHP. My wife still uses the WordPress admin interface as the main admin tool, while the public-facing website is rendered by Laravel, with data provide…

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.

First request to finished render without any client side caching takes 5 s on my end, so I expect it to take maybe the double on an elderly device with a wobbly connection.

There might be better ways to increase profits.

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

#32
post #5

If I understood correctly, this is basically a collection of Eloquent (Laravel's ORM) models that represent Wordpress database tables. Nifty tool for PHP projects that need to interface with Wordpress data. With how large the Wordpress market is, this is probably desired by more teams than one could think of at a quick glance.

Looks to me to be a bit more than that in the repo.

Not sure if this is a thing in Laravel yet but usually it's easy to generate ORM classes from an existing database. Symfony has it in their CLI tool, or had back in 2019 when I last used it.

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

#34
post #23
post #17

Corcel has worked great for us, even in a production environment. Our family's e-commerce business previously had a slow and bloated WooCommerce site, largely due to my skill issues. However, we were able to rescue the site by using Corcel, Laravel, Filament, and LunarPHP. My wife still uses the WordPress admin interface as the main admin tool, while the public-facing website is rendered by Laravel, with data provide…

in wordpress ecosystem do not blame yourself if you end up with a bloated site :)

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 every order (e.g., customer order IP, etc).that's in the meta table. Why those we're moved to the new table IDK.

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

#35
post #5

If I understood correctly, this is basically a collection of Eloquent (Laravel's ORM) models that represent Wordpress database tables. Nifty tool for PHP projects that need to interface with Wordpress data. With how large the Wordpress market is, this is probably desired by more teams than one could think of at a quick glance.

Agreed. I've been doing freelance design/dev for small businesses for 15+ years and at first I would always choose the best current CMS available. Wordpress was always an option, but it was clunky and had a mixed reputation. Well, all those CMSs are gone and I had to migrate several sites. Wordpress offers one of the most important things to these small businesses: (relative) consistency and dependability. I can very…

> Wordpress offers one of the most important things to these small businesses: (relative) consistency and dependability.

Kudos. Maintainability. It matters. I wish more devs realized that their DIY solutions are a disservice to the client once they leave the project.

WP has it (many) faults. But in general a good new dev can - with some effort - pick up where the ex-dev left off.

Clients should not loose sleep tracking down support for some esoteric megalomaniac-developer solution.

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

#36

This is very cool! It always felt like PHP was behind in tooling - git-driven CI was challenging for WordPress (because the framework's plugins edit the project files and it is married to subversion), and serverless PHP was basically impossible until Laravel Vapor came along. Projects like this give me hope and excitement. I wish Corcel was around years ago when I had to write gross SQL string interpolation for vario…

Agreed on PHP tooling. I'm surprised more hasn't been borrowed from other frameworks. Working in this space too on serverless wordpress+mariadb[0]. We have a lot of open source tooling on our roadmap to make this as complete as serverless for other languages. 0. https://www.agiler.io

PHP tooling is amazing. WordPress tooling is not, since it uses archaic development practices.

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

#37

I can see why people would do this with existing WordPress setups, but would there be any reason to consider it for a new build over a dedicated headless CMS (like Strapi or a bunch for PHP I don't know well enough to name) or headless CMS SAAS (like Prismic)?

We migrated from WordPress to Prismic several years ago, then migrated to Strapi a year ago, and it has been miserable.

We originally used Corcel with our Laravel installation, but somehow still found malware, so we immediately decommissioned the entire WordPress install and switched to Prismic. Prismic worked great and I regret switching to Strapi, but I felt the extensibility would be better (and latency reduced) if we self-hosted our headless CMS.

Managing Strapi is a full-time job, and their support for things like localization and their API are terrible. Don’t believe their marketing hype.

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

#38

Earlier quoted context omitted.

Agreed on PHP tooling. I'm surprised more hasn't been borrowed from other frameworks. Working in this space too on serverless wordpress+mariadb[0]. We have a lot of open source tooling on our roadmap to make this as complete as serverless for other languages. 0. https://www.agiler.io

PHP tooling is amazing. WordPress tooling is not, since it uses archaic development practices.

I am not a PHP developer, and our php code is all third party apps.

Do you have any write ups on PHP tooling? My feeling is that php tooling has a hard time handling stateless images, you often need to install plugins to php applications with a GUI with no good way to do it in a build process. Config of php applications is always an mix of php.ini and database config, often making monitoring a case of writing custom http requests and html parsing. I am not that happy with Java but there are many things it get right especially in tooling.

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

#39
post #17

Corcel has worked great for us, even in a production environment. Our family's e-commerce business previously had a slow and bloated WooCommerce site, largely due to my skill issues. However, we were able to rescue the site by using Corcel, Laravel, Filament, and LunarPHP. My wife still uses the WordPress admin interface as the main admin tool, while the public-facing website is rendered by Laravel, with data provide…

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.

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

#40
post #23

Earlier quoted context omitted.

in wordpress ecosystem do not blame yourself if you end up with a bloated site :)

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.
Post reply on HN