Installing and running the framework
Installation with Composer
composer create-project makscraft/mv-framework project_name
If your project is located at the root of the domain, go to the domain's root directory and run the composer command with a . (dot) instead of project_name.
cd project_directory
composer create-project makscraft/mv-framework .
If your project is not in the root of the domain, you will need to specify the project's subdirectory, such as /my/project/, during the composer installation. All other basic settings will be generated automatically.
If you selected MySQL as the database during the installation process, the installer will prompt you to enter the connection details in the .env file, then go to the project directory and run the command:
cd project_directory
composer mv:database
After the installation process, start your HTTP server and check the application. A start page with menu links and access to the admin panel should open.
After Installation
To set localization when installing through Composer, run the command in the project directory:
composer mv:region -- de
Also, for full functionality on a production server, you need to fill in the following parameters in the .env file:
APP_ENV=production
APP_DOMAIN=https://mydomain.com
APP_TIMEZONE=Europe/London
EMAIL_FROM='Name and Email address'
Manual installation
- Download the archive from the current site and unpack the contents into your project folder.
- Fill in the database section in the .env file in the root directory (sqlite is set by default, in which case you don't need to fill anything for it to work).
- For MySQL, the initial dump is located in the /userfiles/database directory. Upload it to your database.
- If your project is not in the domain root, you need to fill in the APP_FOLDER setting in the .env file and the RewriteBase value in the .htaccess file with the same value, e.g., /my/project/.
- You don’t need to fill in the APP_TOKEN value in the .env file, as MV will later generate a random value and ask you to place it in the .env file.
- After the installation process, start your HTTP server and check the application.
- To set the localization package, set APP_REGION=de in the .env file and copy the models and views folders from the customs/regions/de directory over the project’s root folders.
The admin section is located at /adminpanel, with the initial login and password set to 'root' and 'root'.
System update
The MV core and admin panel are periodically updated, with bug fixes and new features added. To update the MV framework, follow these steps.
If MV was installed via Composer:
cd project_directory
composer update
For a manual installation:
- Download the latest version of the MV core from this site or from the Github repository: https://github.com/makscraft/mv-core.
- Go to the root of your project.
- Copy over the old folders with the following folders: adminpanel, core, and the config/autoload.php file.
- If the admin panel folder was renamed, you need to update its contents.
Changing the admin panel folder
To enhance privacy, the admin panel folder can be renamed, and site management will be available at a different URL. To do this:
- Rename the adminpanel folder.
- In the config/setup.php file, change the 'AdminFolder' option to the name of the new folder.