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

Gabotronix's avatar

Question about web deployment in Ubuntu/Windows

Hi everybody, when I'm learning and tinckering with web development I work on windows 10 but I have heard good things about ubuntu, the thing is I want to deploy my first test web apps using Digital Ocean which apparently is pretty ggod, DO vps use ubuntu and most of the tutorials I have seen on web deployment use Ubuntu for this. I want to try nginx too!

I's like to be able to use windows for watching netflix and ubuntu for web development, what would be the best way to do this?

should I create a virtual machine with ubuntu in my laptop? will this make my laptop run slower? sorry for the noob question but I'd love to hear some suggestions.

0 likes
2 replies
Cronix's avatar
Cronix
Best Answer
Level 67

There is already an Ubuntu VM all set up and preinstalled with everything laravel needs out of the box. It uses nginx as well.

https://laravel.com/docs/5.7/homestead

    Ubuntu 18.04
    Git
    PHP 7.3
    PHP 7.2
    PHP 7.1
    Nginx
    Apache (Optional)
    MySQL
    MariaDB (Optional)
    Sqlite3
    PostgreSQL
    Composer
    Node (With Yarn, Bower, Grunt, and Gulp)
    Redis
    Memcached
    Beanstalkd
    Mailhog
    Neo4j (Optional)
    MongoDB (Optional)
    Elasticsearch (Optional)
    ngrok
    wp-cli
    Zend Z-Ray
    Go
    Minio

So you can install that on windows (or MacOS, or Linux), be working on your code while using it and know that everything will work after you upload it to a real server.

Most VM's allow you to install whatever OS you want. I tend to use Ubuntu, so it works nicely (production environment matches production environment). If you use the Laravel Forge service for creating your servers, this is the exact image they use (although with more security built in that you wouldn't need in dev)

It's really important, especially on windows, since windows OS isn't case sensitive whereas most linux systems are. So if you have code like somemodel::all(), that might work in windows but will break in linux since the class (and file) is actually SomeModel. Windows won't care, everything else will. So when you upload it to a linux OS, you have code breaking all over due to mismatched caps. This would prevent that as you'd catch all of those errors while developing on Ubuntu.

diegoaurino's avatar

Hello, Gabotronix!

Have you heard about WSL (Windows Subsystem For Linux)? My current workflow is to develop on Windows, test on Ubuntu 18.04 on WSL, and then to deploy on VPS with Ubuntu 18.04. You can use git hooks to take full control of this process. 

You do not need to use a VM in your case. I use VMs/Vagrant only in special cases. You can run a full GNU distribution natively on WSL; the only difference over a VM is that you are not using the Linux Kernel. 

Homestead is an awesome tool on Mac, but it is a pain on Windows sometimes.

You can find more about how to activate WSL here:  https://docs.microsoft.com/en-us/windows/wsl/install-win10 

After that, go to the Windows Store, search and install Ubuntu 18.04. 

Good luck!

Please or to participate in this conversation.