[ Solved ]How to Change the WWW Root Directory on WampServer 3

June 18, 2018| demoplanet

Yes, we all want to save our files and documentation from system crash of C Drive. To avoid this issue we generally locate our “WWW” or “htdocs” directory in different location from the default installation directory i.e. C Drive.

So it’s very easy to change the “WWW” directory in latest WampServer 3 that comes with PHP 5.6 , 7.x , MySQL as well as MariaDB.

  1.  Click on WampServer icon in right side bottom taskbar
  2. Select the Apache menu -> httpd-vhosts.conf from the Pullup menu box.
  3. Search (CTRL + F)for the term “DocumentRoot”
  4. Change the DocumentRoot path
    "${INSTALL_DIR}/www"

    to your custom directory e.g.

    "E:/www"
  5. Save your changes and “Restart All Services”

When you browse to http://localhost, before the directory change the localhost window looks like this one.

And after the change for directory the localhost window looks like this one.

Server Configuration

Apache Version:
2.4.33  – Documentation
PHP Version:
5.6.35 and 7.x support – Documentation
Server Software:
Apache/2.4.33 (Win64) PHP/5.6.35 – Port defined for Apache: 80
Loaded Extensions :
  • apache2handler
  • bcmath
  • bz2
  • calendar
  • com_dotnet
  • Core
  • ctype
  • curl
  • date
  • dom
  • ereg
  • exif
  • fileinfo
  • filter
  • ftp
  • gd
  • gettext
  • gmp
  • hash
  • iconv
  • imap
  • intl
  • json
  • ldap
  • libxml
  • mbstring
  • mcrypt
  • mhash
  • mysql
  • mysqli
  • mysqlnd
  • odbc
  • openssl
  • pcre
  • PDO
  • pdo_mysql
  • pdo_sqlite
  • Phar
  • Reflection
  • session
  • SimpleXML
  • soap
  • sockets
  • SPL
  • sqlite3
  • standard
  • tokenizer
  • wddx
  • xdebug
  • xml
  • xmlreader
  • xmlrpc
  • xmlwriter
  • xsl
  • Zend OPcache
  • zip
  • zlib
MySQL Version:
5.7.21 – Port defined for MySQL: 3306 – Documentation
MariaDB Version:
10.2.14 – Port defined for MariaDB: 3307 – Documentation

Recommended Readings

https://planetthemes.com/change-php-version-5-6-to-7-x-in-wampserver-3/

Categories: Tips and Tricks

Leave a Reply

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

Rating*