Integrating third-party PHP code

Hi all,

we need to integrate third-party external PHP code.

Let’s call our applications fooapp1 and fooapp2.
We need to have them be available online via
http://www.test.com/fooapp1 and http://www.test.com/fooapp2 or http://www.test.com/thirdparty/fooapp1 and http://www.test.com/thirdparty/fooapp2
how can we do this?

One way is to put this things into web/fooapp1 and web/fooapp2 but I don’t think it would survive a deployment. We would like to have some place like: web/app/thirdparty/fooapp1 and web/app/thirdparty/fooapp2, is this possible? must they be linked?

Thanks for infos.

I believe this is what Composer is for.

1 Like

Couple options:

  1. Just commit the code into your WP repo at the sub path you need. WordPress is only “run” when you go through its index.php file. So if you have another subdirectory it will work as long as Nginx is setup to serve it. It may need configuration just like WP has.

  2. Keep those third-party apps as separate repos and deploy them separately. You can set up Nginx to serve up a subdirectory of a site from a completely different location.

1 Like

Perfect, thanks @swalkinshaw!