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

mash100's avatar

Deploying Laravel as a subdomain of a wordpress site

There is a blog built using wordpress under a domain.com. Now the api of mobile app are written with laravel. I want to deploy laravel in the same hosting to access api as api.domain.com or domain.com/api . I am clueless about this kind of deployment. Any help or clue?

0 likes
4 replies
bobbybouwmann's avatar

How does your current deployment look like? This is easily done with Laravel Forge for example.

mash100's avatar

As I said, I have no clue how to do it, it is not deployed yet. Can you give some example? And not going to use Forge hosting service.

bobbybouwmann's avatar

Well you first need to decide how you're going to host your application. Is it a shared server (bad idea), is it a VPN? Do you have multiple projects on one server or is the subdomain running on a different server? That means you have to play around with DNS.

Without information I really can't help you further!

slacky's avatar

@bobbybouwmann Hello I know this is old question, but i'm facing this specific problem, VPS Server, there is subdomain and i need to put my laravel project in subfolder, how should i deal with laravel public_html folder >

Please or to participate in this conversation.