Installing Drupal 9 on Windows 10

 1. Setup Database on MySQL 

# create database

CREATE DATABASE db_name;

CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

SHOW DATABASES;

GRANT ALL ON db_name.* TO 'user_name'@'localhost' IDENTIFIED BY 'userpass_name';

SELECT user FROM mysql. user;

FLUSH PRIVILEGES;

EXIT;

2. Download and Extract Drupal 9

3. Add Entry in IIS 

4. Navigate to URL

ISSUES

Issue:.IIS Handler Mapping Error: 

There was an error while performing this operation" web.config
Filename: \\?\C:\Inetpub\wwwroot\<folder>\web.config



Details:

It turned out the website was using URL rewrite module which i was missing.

Downloaded web platform installer from MS and installed URL rewrite module.

http://www.microsoft.com/web/downloads/platform.aspx

Wish IIS errors were more informative than just "There was an error..."

Resolution:

install URL Rewrite 


Issue: PHP EXTENSIONS Disabled gd windows 10 IIS

Resolution:

In order to enable GD Library support for PHP on Windows server, follow the below mentioned steps:

First of all, make sure that php_gd2.dll file is present into the directory identified as extension directory in PHP folder.

If the above file is not present, then you need to download it from http://php.net/ and copy in the extension directory of PHP folder.

If the file is already present, then you need to enable php_gd2.dll extension from php.ini configuration file.

You can verify extension-dir through PHPINFO page. Following is the code for PHPINFO Page:

<?php

phpinfo();

?>

After performing all these steps, restart the IIS web server.


Issue: Upgrade MySQL from 5.x to 8.x

Resolution:

https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-8.0.19.0.msi

https://www.sqlshack.com/how-to-install-mysql-database-server-8-0-19-on-windows-10/

cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"

#Backup the databases

mysqldump --lock-all-tables -u root -p --all-databases > dump.sql

#Stop the service and Uninstall

SC STOP MySQL

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin" -u root shutdown


Issue: OPcache disabled

Resolution:

OPcache can only be compiled as a shared extension. If you have disabled the building of default extensions with --disable-all, you must compile PHP with the --enable-opcache option for OPcache to be available.

Once compiled, you can use the zend_extension configuration directive to load the OPcache extension into PHP. This can be done with zend_extension=/full/path/to/opcache.so on non-Windows platforms, and zend_extension=C:\path\to\php_opcache.dll on Windows.

Note:

If you want to use OPcache with » Xdebug, you must load OPcache before Xdebug.

Recommended php.ini settings ¶

The following settings are generally recommended as providing good performance:

opcache.memory_consumption=128

opcache.interned_strings_buffer=8

opcache.max_accelerated_files=4000

opcache.revalidate_freq=60

opcache.fast_shutdown=1

opcache.enable_cli=1