Support the ongoing development of Laravel.io →
Requests Packages Architecture
Last updated 7 months ago.
0

Why even bother to use Wordpress? Thats for people that don't know how to program xD

Last updated 7 months ago.
0

If it were me and I had to pull this off as you described I would install Wordpress in the public folder of laravel..... so /home/user/public/wp

/home/user/app

Then I would create the routes I want handled by Laravel.... Followed by a catch all that routes to WP

Route::get('/', array('as'=>'root', 'uses'=>'[email protected]'));
Route::get('home', array('as'=>'home', 'uses'=>'[email protected]'));
Route::get('login', array('as'=>'login', 'uses'=>'[email protected]'));

//catch all and route to wordpress
Route::get('/{alias?}', function($alias) {
  return Redirect::to('/wp/' . $alias);
});

It might need a little tweaking but as long as the wordpress files live in a folder inside Laravel's public folder then the URLs will route...... a more simple way would just have all wordpress links start with /wp/ then you don't even need the catch all it will auto route to the folder in public. But if you don't want people to have to do /wp/contact-us and you just want them to do /contact-us and hit wordpress then my example should work.

Last updated 7 months ago.
0

I am in this situation right now. Has this been resolved? Please share the solution. Thanks!

Last updated 7 months ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

novakben novakben Joined 21 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.