An OSTraining member asked how to setup Drupal with XAMPP so that they could work with multiple Drupal sites.
This tutorial will show you how, step-by-step.
Download XAMPP from Apache Friends.
Select the version you want to use:
Install it to a location of your choice. I have chosen “D:” for my installation.
Now that we have XAMPP installed, we need to configure it. Launch the application and go to config:
From here you should check that the:
- Editor selected is the one you want to use. I use atom so you can see that I have selected atom.
- Browser if left empty will use your default browser.
If you have another service installed that is using port 80, you will need to make a few changes to the “Service and Port Settings”:
In order to use the service, update the Apache Main Port and, if you use Mercury, change Port 1.
Since I already have Port 80 in use, I have set the port to 8088:
Now XAMPP is configured but we also need to configure Apache to use the same settings.
We want to check the httpd.conf:
This will open the file in our editor.
We need to update lines 58 and 221, changing 80 to 8088.
Save and close the file.
Now you will need to close XAMPP and reopen it.
Start Apache and MySQL
If you have successfully started the service(s), it should appear in green. If you get an error, it should be explained in the box below.
Now if we go to http://localhost:8088/ , you should see the default load screen for XAMPP:
Now check that PHPMyAdmin is also working -;http://localhost:8088/phpmyadmin/
We need to make the empty database for the Drupal site.
Open the htdocs folder inside XAMPP either from your browser or use the Explorer button from the XAMPP control panel.
Drop your files into a new folder. In this case, I have made a new site and put it in a folder called Drupal8. To access this we need to go to http://localhost:8088/drupal8/core/install.php and the installation process will begin. To create a database you only need to give it a name and use root as the user. By default XAMPP does not set a password for PHPMyAdmin.
Drupal needs some PHP tweaks to run effectively. Go to the config button for Apache and select the PHP (php.ini)
Update lines 368, 378, 389, 656, 1922