Developing on Windows with WSL2 (Subsystem for Linux) and PHP
25,163 views
0

 Published On Oct 26, 2021

Developing on Windows with WSL2 (Subsystem for Linux) and a PHP LAMP stack on wsl2. Adam Culp of Beachcasts PHP programming videos shares how to set up a local development environment with PHP on WSL 2, also known as Windows Subsystem for Linux, and installs a Laravel framework project for local development. By installing a full lamp stack on WSL 2. In this Laravel howto we will set up Apache, and PHP on Ubuntu using WSL, for an awesome WSL 2 local dev environment. I also show how to launch VS Code and Windows Explorer from within Ubuntu running inside WSL 2.

For information about doing this with Laravel Sail, see    • Getting Started using Laravel Sail fo...  

Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!

Key Topics:
- Creating a development environment using Ubuntu running on WSL 2
- Installing LAMP in WSL 2
- Creating a symbolic link to a working directory on a Windows host
- Setting up the userdir extension for Apache 2
- Install and configure a Laravel based application on Ubuntu within WSL 2
- Launching Windows-based tools from within WSL 2 via CLI

For a nice list of equipment I use in my studio, and to support the channel if you make any purchases (doesn't cost you a thing), visit my kit at kit.co: https://kit.co/beachcasts/beachcasts-...

Errata:
Let me know if you notice anything that should be errata

Associated Links:
https://php.net
https://laravel.com/
https://apache.org
https://code.visualstudio.com
https://docs.microsoft.com/en-us/wind...
https://beachcasts.com

Timeline:
00:00 Intro
01:25 Prerequisites for setting up a development environment in WSL 2
02:17 Installing Apache 2 on Ubuntu in WSL 2
02:55 Install PHP in WSL 2
04:21 Creating a working directory on Windows (host) to use within Ubuntu (WSL)
05:33 Add a symbolic link to the directory on the Windows host
08:13 Activate userdir extension for Apache 2
09:04 Configure the userdir extension
11:47 How to install Composer dependency manager for PHP globally
14:11 Installing the Dom extension (XML extension) for PHP, and unzip utility for Ubuntu
15:47 Creating a Laravel based application on Ubuntu within WSL
17:31 Notes about rendering speeds using WSL 2
18:57 Alternative methods for serving websites from WSL 2
19:55 Launching VS Code from within a WSL 2 environment over CLI
21:06 Launching Windows Explorer from within WSL 2 to view files on Windows host


Other Beachcasts videos you might find interesting:
WSL 2 with Docker Gettings Started and Docker Desktop Installation    • WSL 2 With Docker Getting Started and...  
Getting Started with WSL 2 and Ubuntu on Windows 10    • Getting Started with WSL 2 and Ubuntu...  
Conference Talk Preparation In 8 Steps for Programmers    • Must Follow 8-Step Guide To Conferenc...  
How to understand code written by someone else    • Secrets of how to understand code wri...  
Ways to advance your programming skills and improve as a developer    • Ways to advance your programming skil...  
Make your local DEV environment available on the internet    • Make your local DEV environment avail...  
AWS Elastic Load Balancer (ELB) Tutorial How-To    • AWS Elastic Load Balancer (ELB) Tutor...  
Laravel Model Factory Tutorial using Artisan make:model    • Laravel Model Factory Tutorial using ...  
Authentication in Laravel Tutorial    • Authentication in Laravel Tutorial fo...  
Top 5 skills to be a better software developer    • Top 5 skills to be a better software ...  
Install Laravel in Docker container on Ubuntu for beginners    • Install Laravel in Docker container o...  
Getters and Setters accessors in object-oriented programming    • Getters and Setters accessors in obje...  
Critical programming issues preventing a PHP 7 upgrade    • Critical programming issues preventin...  
Behat for beginners functional REST API testing tutorial    • Behat for beginners functional REST A...  
Doctrine ORM one-to-many bi-directional association    • Doctrine ORM one-to-many bi-direction...  
PHP Mess Detector static analysis to find PHP code smells    • PHP Mess Detector static analysis to ...  
Doctrine ORM one-to-many self-referencing association    • PHP DoctrineORM one-to-many self-refe...  
10 reasons to become a consultant in a consulting business    • Top 10 Reasons To Be a Programming Co...  
10 bad things about consulting    • Top 10 bad things about consulting, w...  
How to get lines of code in PHP    • PHPLoc Lines of code static analysis ...  
Use UUID with Doctrine ORM for DB keys    • UUID with Doctrine ORM in Zend Expres...  
Make a Create handler middleware    • Create Handler middleware in Zend Exp...  
Automate Hypermedia creation for PHP REST API    • Automate Hypermedia PHP REST API with...  
Configure Doctrine ORM    • Configure Doctrine ORM and Dbal CLI w...  
Configure PhpStorm for PHP development with Docker    • PhpStorm setup for PHP web developmen...  
Create PHP development environment with docker    • PHP web development environment with ...  

Help through referrals:
Thinking of buying a Tesla electric vehicle? Use this referral link to also get six months of free Supercharging for both of us. Thank you. https://www.tesla.com/referral/tanya2...

I use TubeBuddy to help me manage my YouTube channel. If you're interested, click the following link to check it out. https://www.tubebuddy.com/beachcasts

#php #wsl2 #beachcasts

show more

Share/Embed