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

Blindacme's avatar

Possible to use Forge for Laravel AND WordPress?

This may be a silly question and I'm still relevantly new to Laravel and most recently Forge. I have set up Forge to work with Digital Ocean. I'm wondering if it is possible to use WordPress for the front end facing website and use Laravel as a web app.

In case I'm not explaining it well, I have a multitenant webapp I built in Laravel and ideally I would like for it to use wildcard subdomains for the webapp. However for the front end of my website I would like to use WordPress.

I think the setup would be something like my-domain.com (WordPress) and app.my-domain.com would host the webapp (Laravel). By doing it this way could I still allow for wildcard subdomains so someone could use: user.my-domain.com to get the webapp?

If this is possible I guess I'm having trouble understanding how to set it up in Forge/Digital Ocean, can anyone help point me in the right direction?

0 likes
4 replies
Blindacme's avatar

@lars6 so would the steps be like this?

  1. Add new site my-domain.com PHP / Laravel /public (check) Allow Wildcard Subdomains
  • Use WordPress app for my-domain.com
  • Install LetsEncrypt SSL
  1. Add new site app.my-domain.com PHP / Laravel /app (DO NOT check) Allow Wildcard Subdomains
  • Use Github with my Laravel app
  • Install LetsEnrypt SSL (again)?
  1. In DNS settings do the following:
  • Add A record for my-domain.com to point to ip address
  • Add A record for *.my-domain.com to point to ip address
  • Add CNAME www points to my-domain.com
Blindacme's avatar

I just realized this will not work. In order to do what I want I need to Add site, like my-domain.com and install wordpress. Now how can I achieve hosting a laravel app in the /app directory and point wildcard subdomains to use that laravel directory but keep my-domain.com to use WordPress. The only way I can think of is using 2 servers from Digital Ocean/Forge and pointing the main domain to that IP and the wildcard domains to the other IP address in my DNS. Is this the only way?

codenex's avatar

Never seen it done that way. Most Laravel / Wordpress hybrid uses WordPress as the back-end.

I'm very biased as I hate WordPress so I'd just roll my own front-end.

Please or to participate in this conversation.