Setup development environment for Drupal on windows 10

Being a Drupal developer, I would prefer to work on Mac or Linux (ubuntu) operating system for fast and hassle free development work, but some times you will not get such preferences, may be due to organizations’ norms.

Let's say you got a Windows machine for your local development where you have been assigned to a Drupal project.

Let's dive into process of installing all required software needed. I am assuming individual have permission to install WSL from organizations administrator team.

Following sets of applications will be require in order to setup local environment:

  • Install Windows Subsystem for Linux (WSL)
  • Install VS code along with WSL plugin.
  • Install PHP, MySql, Apache2/Nginx:
    
        sudo apt-get install lamp-server^
        
  • Git:
    
        sudo apt-get install git
        
  • Composer
  • Drush:
    
        composer global require drush/drush
        

That's all you need to start with your develoment

You might need to create separate user for your mysql


  sudo mysql -u root
  [sudo] password for :

  mysql> USE mysql;
  mysql> CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal';
  mysql> GRANT ALL PRIVILEGES ON *.* TO 'drupal'@'localhost';
  mysql> ALTER USER 'drupal'@'localhost' IDENTIFIED WITH mysql_native_password
  BY 'drupal'; 
  mysql> FLUSH PRIVILEGES;
  mysql> exit
  

Comments

Popular posts from this blog

How to setup Drupal 8 Multisite on nginx webserver with different domain.

Install drush globally using composer on WSL

Drupal views create exposed filter programmatically