How to install Drupal on XAMPP server ( Localhost ).
To Install Drupal, We require a Web server. We will be employing XAMPP package for the same purpose. XAMPP is a free and open source web server solution stack. It stands for (X-cross platform), (A-Apache HTTP Server), (M-MariaDB), (P-PHP), (P-Perl). XAMPP is hassle free and is widely used by developers all over to create a local web server.
To install XAMPP, We have a full Xampp installation tutorial, you can see this guide.
Once you finish Xampp installation, open the Xampp control panel and start Apache, MySQL.
Download latest version of Drupal from www.drupal.org/download.
Download Zip or tar.gz file to your computer.
After downloading the files, extract source code of drupal and put to PHP folder (www on appserv or wamp, htdocs on xampp). “C:\xampp\htdocs”
Change the folder name to “drupal” for your ease of use.
Go to PHPMyAdmin and create a new database ‘drupal’ to import data while installing drupal:
Next, Go to privileges tab, to give privileges to a user. Click on “add a user account”.
Create the Database user by adding
+Hostname (Here it is localhost)
+password.We have to enter these details while installation.
Select Check all privileges to database ‘drupal’ and click on ‘GO’ button
On next window Grant all database-specific privileges to the user. and click on ‘GO’ button.
Assuming that we install drupal to folder “drupal”, now, go to your browser and access this link: http://localhost/drupal
Now you will see drupal installation interface. You can select the language and Click “Save and Continue”:
Now, select Standard installation profile and Save and continue to verify requirements.
Verify the requirements tab gives you a warning message to install OPcache.
To install OPcache, Open php.ini file( which is located in C:\xampp\php) and copy the below code to the end of the file.
zend_extension = “C:\xampp\php\ext\php_opcache.dll”
Click on “retry” on drupal installation window which will continue database configuration. Enter the database details that you created earlier. Database name, Database username and password.
Once you finish click on “Save and continue” to install drupal. If your computer is very slow, browser will show you an error message Fatal error: Maximum execution time of 30 seconds exceeded in”C:\xampp\htdocs\drupal\Core\lib\Drupal\Core\Database\Statement.php” on line 59
To Fix this, open php.ini and change max_execution_time=30 to larger number ( like 100 above ) and save.
Once the installation finishes you have to configure the new site by entering the Site name, Site email address, Site maintenance account. This account is used to login administrator site.
Click on “Save and continue” will do the installation of drupal. and redirect you to drupal administration site.