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

timgavin's avatar

Run PHP on remote server

What's the best way to run PHP scripts on a remote server?

I have a video encoding server and I want to upload files from my Laravel app to the encoding server, then run a script to encode the video. Both servers are set up on Forge.

0 likes
4 replies
kfirba's avatar

@timgavin How about setting the two servers on a private connection and use Jobs for that? Then in your app server you can push jobs onto a specific queue and make the encoding server listen on that queue alone and process the job. Think it can work for you?

1 like
timgavin's avatar

@kfirba The thought has crossed my mind. I had originally created an encoding class outside of Laravel, and now I'm thinking of recreating it in Laravel for that very reason. However, I'd like it to be realtime, so that when a user uploads, they see the encoding progress immediately via Pusher notifications - which update the progress bar. I already have all of this built and it's working.

Can I do that with jobs & queues? I'm just now learning about them and am still pretty fuzzy on how they work.

Update: Your question forced me to look into this and see that it may not only be a viable, better alternative to what I'm currently using, but that it may actually help me simplify the user's experience too. :)

Please or to participate in this conversation.