Manually install Apache PHP MySQL Windows

Dec 21, 2015

Alphanso Tech



Need to setup WAMP server or Manually install Apache PHP MySQL Windows a detailed guide on how to install Apache 2.4.x, PHP 5.x or PHP 7.x & MySQL on Any version of windows (Windows 7-8-10). The guide also includes steps for x64 bit Apache & PHP on x64 bit Windows machine. You can take full advantage of your development machine’s hardware resources.

Manually install Apache PHP MySQL Windows - Getting Ready

Three Pre-Requisites for Manually install Apache PHP MySQL Windows tutorial:

  • Apache
  • PHP
  • MySQL
  • VC++ runtimes

Apache 2.x

Manually install Apache PHP MySQL Windows - Getting Apache Ready

First and foremost part of server setup. Apache listens the port 80 by default and serves the web requests.
Apachelounge is our favorite source for Apache Windows builds. To download Apache:
Apache for x64 bit Windows
Apache for x32 bit Windows
After download unzip the the package. Find the Apache24 folder. Copy it and place it on your C: drive (Or any drive of your preference).

PHP 7.x

Manually install Apache PHP MySQL Windows - Getting PHP Ready

Downloading PHP is the second part of manually install apache php mysql windows guide. PHP has started developing x64 bit build for windows os lately. We can go for x32 bit or x64 bit windows built.
To Download PHP:
PHP 7 for Windows
Rename php.ini-development to php.ini This will be the configuration file we will be using to configure our php settings.


MySQL will be the final step for application download and installation process. Download MySQL here. The installation is pretty simple and straight froward. Follow the onscreen instructions. This also includes external components auto installation, setup bundles with all required third-party components.

VC++ Runtimes:

You need to install the VC++ run-time dependencies for Apache to run under windows environment.  Download the x86 VC++ for 32-bit windows and x64 VC++ for 64-bit windows.

Apache Configuration

Open Apahce24 folder that we placed on C: drive(Your preferred location). Locate and open conf folder. Open httpd.conf file under the folder. We prefer Notepad++ for settings configuration. Change the configuration mentioned below to your httpd.conf file. Observe the Line 179-189, Line 242-250, Line 278 & 285 for changes. Download the configurationready httpd.conf file here

# PHP 7 configuration

LoadModule php7_module C:/PHP/php7apache2_4.dll

<IfModule php7_module>
    DirectoryIndex index.html index.php
    AddHandler application/x-httpd-php .php
    PHPIniDir "C:/PHP"

# End PHP 7 configuration

# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.

# Changing settings for virtual host creation
<Directory />
	#Options All
    #AllowOverride ALL
    #Require all denied
	Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important.  Please see
    # for more information.
    Options ALL

    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    AllowOverride All

    # Controls who can get stuff from this server.
    Require all granted

PHP.ini configuration

Open the PHP directory that you have saved to C: drive (your preferred drive). Find the php.ini file for configuration changes. Look following mentioned section on your php.ini file for changes.

Download the sample php.ini configuration file here.

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30000

; Maximum input variable nesting level
; If you need variable nesting in some complex array structures etc...
max_input_nesting_level = 500

; How many GET/POST/COOKIE input variables may be accepted
; To process larger form input values via GET/POST
max_input_vars = 1000

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 100M

; Maximum allowed size for uploaded files.
; Change if for larger size file uploads.
upload_max_filesize = 200M

; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
extension=php_exif.dll      ; Must be after mbstring as it depends on it
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client

Apache as windows service:

Final step for Manually install Apache PHP MySQL Windows tutorial is to install apache as windows service. It will automatically start while login.

  • Open command prompt with administrator privilege
  • Goto your Apache24 directory
    • cd c:apache24 (If you store Apache24 on C drive)
  • Goto bin direcotry
    • cd bin
  • Fire the following command
    • httpd.exe -k install “Apache24”

Advantage of using manual installation:

What benefit you get by following Manually install Apache PHP MySQL Windows tutorial when There are popular software bundles available such as XAMPP and WAMP? The main advantage of is to take advantage of x64 bit windows platform. MySQL Database performance would be the biggest gain and separation of applications is main advantage. You can update individual component without affecting other application bundle. It works and behave more like OS integral part as it works under Linux platform. You don’t need to open any application interface and turn anything on or off.

Post by Alphanso Tech

Created in 2013, Alphanso Tech is a leading IT Consulting company with a presence in the USA, Canada, and India.We are a trusted and leading service provider to many top-tier companies in the area of Custom WordPress Development , Web Application Development , iOS App Development , Outsourcing Services, Online Marketing and many other related activities.

2 Responses to Manually install Apache PHP MySQL Windows

  1. Pingback: php tutorials with examples | Step by Step tutorial guide

  2. Pingback: configure xdebug windows netbeans for PHP debuggin -

Leave a Reply

Your email address will not be published. Required fields are marked *