t9dev's avatar
Level 2

Need Help, How to have both WordPress and Laravel on the same Domain?

I am working for a company that has a Portfolio website using WordPress under a domain, and I have developed a simple multi-steps form using Livewire and Laravel. However, they want me to upload it to the existing server that has the WordPress website.

I have uploaded all the Laravel files to server through FTP using (FileZilla), and I am afraid that when I move the index.php from the public folder to the public_html folder, it conflicts the whole existing website since there is an index.php for the WordPress.

Any ideas on how to have both of them working together?

0 likes
4 replies
Hassankhan's avatar

I just did similar with Wordpress as the main site and a Laravel app in a subfolder Hope it helps!

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/ [L]
</IfModule>
t9dev's avatar
Level 2

@Hassankhan, where should I place the laravel/public folder content? Inside a folder in the public_html or keep it in the /laravelapp folder ?

Please or to participate in this conversation.