Skip to content

Instantly share code, notes, and snippets.

@alexander-schranz
Last active April 22, 2016 11:01
Show Gist options
  • Select an option

  • Save alexander-schranz/2ed1e0a254f185b753b7 to your computer and use it in GitHub Desktop.

Select an option

Save alexander-schranz/2ed1e0a254f185b753b7 to your computer and use it in GitHub Desktop.
Install Sulu on Windows with Xampp

0. Install Programs

a. Install Xampp (https://www.apachefriends.org/de/download.html)

b. Install Composer (https://getcomposer.org/download/)
c. Install Git (https://windows.github.com)
d. Add PHP to your PATH variable

1. Install Dependencies

a. Clone Sulu-Standard

git clone git@github.com:sulu-io/sulu-standard.git <folder_to_install_it>

b. Generate Github Token for composer

If need generate a Github Token for composer.
First go to https://github.com/settings/tokens and generate a new Token for your PC.

Go into the sulu folder an run first following command to add your github token to access repositories:

php composer config github-oauth.github.com <token> 

c. Change Branch if needed

If you want a stable version please checkout the latest released Tag https://github.com/sulu-io/sulu-standard/releases

git checkout 1.2.0

e. Create MySQL User

Create an MySQL user for your sulu db in the /phpmyadmin site.
Don't forget to set the right host for this user.

f. Add Git to PATH

That composer can access git and can clone repositories you should add git.exe to your PATH variable. To check if git works (git version) simple use the windows CMD (not use git bash or something else to check). If you don't add git.exe to your PATH composer can not git clone the dependencies and you will not be able to contribute to sulu-io/sulu.

g. Install Dependencies over composer

php composer install --prefer-source

After dependencies are installed it will ask you a view configuration questions. http://docs.sulu.io/en/latest/book/getting-started/installation.html#install-dependencies

2. Setup Sulu

Follow the instructions: http://docs.sulu.io/en/latest/book/getting-started/setup.html

3. Create VHost

http://docs.sulu.io/en/latest/book/getting-started/vhost.html

Example Path to Xampp Vhost Config: E:\YOUR\PATH\xampp\apache\conf\extra\httpd-vhosts.conf

My Example:

<VirtualHost *:80>
    DocumentRoot "E:/Your/PATH/VHosts/sulu.lo/web"
    ServerName sulu.lo
    <Directory "E:/Your/PATH/VHosts/sulu.lo/web">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
        SetEnv SYMFONY_ENV dev

        <IfModule mod_expires.c>
            ExpiresActive On
            ExpiresDefault "access plus 1 month"
            ExpiresByType image/gif "access plus 1 month"
            ExpiresByType image/png "access plus 1 month"
            ExpiresByType image/jpeg "access plus 1 month"
            ExpiresByType image/jpg "access plus 1 month"
            ExpiresByType text/javascript "access plus 1 month"
            ExpiresByType text/css "access plus 1 month"
        </IfModule>

        <IfModule mod_deflate.c>
            SetOutputFilter DEFLATE
            SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
            SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
            SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        </IfModule>
    </Directory>
</VirtualHost>

4. Enable PHP_INFO extension

enable PHP_FILE_INFO extension in your php.ini

5. Performance Improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment