Local installation - HeavyDots/heavyCMS GitHub Wiki
This displays steps to install HeavyCMS locally, for local development of the CMS.
Clone repo
Clone from https://github.com/HeavyDots/heavyCMS
Install composer
Tip: First check your php version because you should use 5.6 binary. If you have different versions of PHP installed, please use full path. Example: /opt/plesk/php/5.6/bin/php
https://getcomposer.org/download/
Windows (Command Line):
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Or Linux:
curl -sS https://getcomposer.org/installer | php
Install composer plugin
php composer.phar global require "fxp/composer-asset-plugin:^1.2.0"
Install vendors
php composer.phar install
Init app
chmod +x init
./init
Or simply init
on Windows.
Database
Create empty db and set credentials in common/config/main-local.php
Run database migrations
yii migrate
Create vhosts
Create Apache Vhosts
<VirtualHost *:80>
ServerName www.heavycms.local
DocumentRoot "C:\Projects\heavyCMS\frontend\web"
</VirtualHost>
<VirtualHost *:80>
ServerName admin.heavycms.local
DocumentRoot "C:\Projects\heavyCMS\backend\web"
</VirtualHost>
Now restart Apache.
Hosts file
Open Notepad with Admin rights on Windows and edit the file C:\Windows\System32\drivers\etc\hosts
.
127.0.0.1 www.heavycms.local
127.0.0.1 admin.heavycms.local
Configure urls for front and back
In file common/config/params-local.php
Create admin user
Go to http://www.heavycms.local/signup and register admin user