Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

alexui's avatar

[Need Advice] Using Laravel with Wordpress

Hello to the amazing community. I am looking for some advice.

Situation:

  • I have a WordPress website (blog) that is doing well when it comes to SEO.
  • I am planning on expanding this website and adding some more complex things down the line which would be much easier to implement using a Framework like Laravel (I love it so far).

What I'm looking to do:

  • Keep the WordPress website going on as it is along with Laravel App (basically keeping existing WordPress routes in place and the new ones will be created using Laravel).
  • Install the laravel app on the ROOT Domain - I know there could be a simple solution to just install the laravel app in the subdirectory, but I'd avoid it unless it's the only option.

Question:

  • I have around 150 Blog Posts on this WordPress website, so is there any way I can maybe define those routes in web.php and somehow let WordPress handle it?
  • I know it doesn't make sense since both frameworks can't be installed at the same time, but maybe we can build some sort of bridge between the two?

Another possible solution would be to import those blog posts on a laravel app and then simply push it to the root domain, but I'm afraid that I might lose the ranking which would be the last thing I'd like to happen.

I'd really appreciate any advice or suggestion. Thank you )

0 likes
3 replies
ekrist1's avatar

A few solutions to consider:

  1. Use Wordpress as a backend and with Laravel, using the Corel package: https://github.com/corcel/corcel

  2. Install Statmatic and import the Wordpress blogposts: https://statamic.com/addons/stopa-development/statamic-wp-import

  3. Use a headless CMS like Sanity.io with Laravel, and convert over to Sanity using this repository as a start: https://github.com/kmelve/wordpress-to-sanity

My personal choice would be to use Statmatic. I wouldn't be too much worried about SEO, I think Google will pick up on the changes pretty quickly, but there might be a temporary drop on organic search if you change the urls.

1 like
drehimself's avatar

Although possible, I personally think it would NOT be worth the effort to try and accomplish this. I would try to keep them as separate projects and maybe only use the WP API to communicate between them.

If you really need some sort of hybrid, I would consider migrating your WordPress site into Statamic: https://statamic.com/. It's built with Laravel and can adapt to your needs, so some sort of hybrid CMS / web app is definitely possible. It should have a WordPresss exporter as well: https://statamic.com/forum/5053-migrate-website-from-wordpress-to-statamic-v3.

If you do it correctly and keep the same slugs/URLs, your SEO shouldn't change that much.

1 like
alexui's avatar

Oh wow! Thank you for the amazing responses. I have just created a new project to test Statamic and oh boy! This is so good! I think I'm gonna go with it for now.

Please or to participate in this conversation.