WTServer - portable Nginx MariaDB Redis Php development stack for Windows

A portable, preconfigured, lightweight, fast and stable server stack for developing php mysql applications on windows, based on the excellent webserver Nginx. A lighter alternative to XAMPP and WAMP.

How to create a new Project

New Project

How to install Magento 2 on Windows

How to Configure NGINX virtual server for various PHP Frameworks

How to install free SSL Certificates from LetsEncrypt

How to upload files or synchronize your project to a server using WinSCP:

Project Buttons

How to use COMPOSER.bat:


Composer is a tool for dependency management in PHP used to download and keep updated various PHP frameworks and components. After you created a new project in c:\pathTo\WWW\projectname, in a command line window, run commands like:

composer create-project symfony/framework-standard-edition c:\pathTo\WWW\projectname 2.4.*

cd c:\pathTo\WWW
composer create-project silverstripe/installer projectname 3.1.*

cd c:\pathTo\WWW
composer create-project laravel/laravel projectname --prefer-dist

How to Debug Configuration Files:

After changing the configuration files, one server might refuse start. In order to find out the reason, you need to Check Configuration Syntax:

How to Clone/Sync WTServer stack to a new machine:

You can safely move the WTServer stack without loosing any data, projects, databases or settings. Run WTServer installer once on the new machine, then overwrite/sync the whole WTServer folder with the cloned one.

For example, syncing your work from C:\MyWork\WTServer on Machine1 to D:\WTServer on Machine2 should be done by running the installer once on Macine2 (and choosing D:\WTServer as destination) then overwriting D:\WTServer each time you need to sync your work.

If you move WTServer stack to a new machine without running the installer, PHP 5.5 and later might refuse to start, because it requires Visual C++ Redistributable for Visual Studio 2012. You can install it manually from here. It will not run on windows XP.

How to change the root directory of a project:

Your project's Nginx settings are stored in conf\domains.d\myProject.conf. This file`s root directive is automatically modified by the WTServer manager for portability.

If you want to use a custom root folder for your project, for example WWW\myProject\public, you can manually set this root directive and lock it using the comment # locked

    root "C:\PathTo\WWW\myProject\public"; # locked

How to allow access from LAN and Internet to your local project:

In the WTServer Manager window, go to Project Setup, check Enable Local Virtual Server, then Save.

Edit WTServer\conf\domains.d\projectName.conf directly or go to Project Setup and click on Edit Nginx Local Virtual Server Configuration File icon.

Edit Nginx Local Virtual Server

Modify like this:

server {
    listen          *:80;

    server_name     projectName.test projectName.com projectName.myDomain.com;

    ### Access Restrictions
    allow           all;
    ## deny         all;

Now Kill Nginx, Start Nginx OR Check Nginx Configuration Syntax.

How to achieve the best performance for live sites:

How to add additional local test server names to my project:

Hosts File Editor

You can always use different/multiple server names for your Local Virtual Server. Use Hosts File Editor (the third icon) to add extra local server names like:    projectName.dev    projectName.test    www.projectName.xyz

Then Edit conf\domains.d\projectName.conf and add

server_name projectName.dev projectName.test www.projectName.xyz;

How to add locations

If you want a location like /phpMyAdmin to serve files from a directory outside your project (but inside PHP's open_basedir), for example C:/WTServer/include/phpMyAdmin you need to edit the Nginx config file:

Edit WTServer\conf\domains.d\projectName.conf to set http://projectName.local/phpMyAdmin Edit WTServer\conf\nginx.conf to set http://localhost/phpMyAdmin

server {
    location ~ ^/phpMyAdmin/.*\.php$ {
            root "C:/WTServer/include";
            try_files $uri =404;
            include         nginx.fastcgi.conf;
            fastcgi_pass    php_farm;
            allow ;
            allow           ::1;
            deny            all;
    location ~ ^/phpMyAdmin/ {
             root "C:/WTServer/include";

Notice that the root directive lacks /phpMyAdmin because Nginx adds the URL path /phpMyAdmin to the root path, so the resulting directory is C:/WTServer/include/phpMyAdmin

How set / change / reset mysql(mariadb) root password:

When you log in to Adminer, you use mysql(mariadb) root account, which by default has no password

In order to set mysql(mariadb) root password, open a command prompt and type C:\WTServer\bin\MySql\bin\mysqladmin -u root password NEWPASSWORD

In order to change mysql(mariadb) root password, open a command prompt and type C:\WTServer\bin\MySql\bin\mysqladmin -u root -p'oldpassword' password NEWPASSWORD

If you forgot the mysql(mariadb) root password, you can reset all user accounts by running C:\WTServer\bin\MySql\bin\mysql_install_db -d c:\WTServer\data

How to Install Extras:

Let`s say you want to use Nginx 1.2.x instead of the currently installed version, or PHP 5.3.x