You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 40 Next »

Table of Contents

Installation

Follow these steps to install Blesta on your server.

1. Download Blesta

Visit https://account.blesta.com/client/plugin/download_manager/client_main/ and click to download the latest version.

2. Unzip the Archive

Unzip the Blesta archive (.zip) file using your favorite compression utility. On Windows, right click and select "Extract All". If the zip is uploaded to or downloaded directly to a Linux server, run the following in your shell:

unzip blesta-vx.x.x.zip
3. Upload Files & Launch Installer

Upload the contents of the public_html directory to your server where you will be accessing Blesta.

Blesta may be installed in one of two ways:

  • Point your web browser to the install directory where you uploaded the contents of public_html (e.g. /public_html/install/), and follow the directions to complete installation. OR
  • In a shell, cd to the directory you uploaded the contents of public_html, and run the following command and follow the directions to complete installation: php ./index.php install

Once completed, you'll be logged in for the first time automatically. For subsequent logins, see Logging In. You may also want to enable Two-Factor Authentication.

License Information

If you do not have a license key, you will be able to activate a free trial during the installation process directly. If you have previously purchased a license key, you will be able to enter it during the installation process. You may obtain a license directly from us at www.blesta.com, from one of our resellers, or directly from your hosting provider. Version 2 license keys are not compatible with version 3, so if you only have a version 2 license key you will need to request a version 3 key for each version 2 license you hold.

4. Set up a Cron Job

Once installation is complete, a cron job must be created to automate tasks within Blesta. Go to [Settings] > [System] > Automation, and copy the "Cron Command", for use in creating a cron job on your server. Most hosting control panels provide an easy way to create cron jobs, follow the documentation for your control panel to complete this important step. The cron job should run every 5 minutes. Once the cron has been configured, verify that the status icon turns green and displays the last time run on the System Automation page within Blesta.

If using a control panel to configure the cron, you may not need to copy the first part of the cron command "*/5 * * * *" which designates that the cron run every 5 minutes. Your control panel may ask for schedule information separately.

 

Running the cron via the web

Using CLI is always recommended, but the cron may be run by accessing https://www.yourdomain.com/blesta/install/path/cron/?cron_key=CRONKEY where CRONKEY is your cron key as displayed under "Update Cron Key"

 

System Configuration

There are a number of configuration settings that may be set before or after installation.

Requiring index.php in URLs

By default Blesta does not include index.php as part of any URL request, thanks to the use of .htaccess mod_rewrite rules. If your server does not support mod_rewrite Blesta requires index.php to be included in all URLs. To force Blesta to include index.php in all URLs simply rename or delete the .htaccess file included with Blesta in your root web directory.

Does your server support URL rewriting?

If so, you may be able to enable pretty URLs by creating the appropriate web server config, and modifying the /lib/init.php file to set define("HTACCESS", true);

Changing the path to the Admin area

By default the path to the Admin area begins with /admin/. To change this locate routes.php in /installpath/config/routes.php and modify the value of the "Route.admin" configuration. For example, to change the path of the admin area to /staff/ set the following:

routes.php
Configure::set("Route.admin", "staff");
Changing the path to the Client area

By default the path to the Client area begins with /client/. To change this locate routes.php in /installpath/config/routes.php and modify the value of the "Route.client" configuration. For example, to change the path of the client area to /customers/ set the following:

routes.php
Configure::set("Route.client", "customers");
Forcing HTTPS

If your server supports mod_rewrite, you can enable HTTPS redirects by uncommenting the following lines (remove the '#' symbols) from the .htaccess file included with Blesta.

.htaccess
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

 

Common Installation Issues

IIS

  • Submitting data reloads the current page
    • There is an issue with your web.config file. Try the following web.config file:

      <?xml version="1.0"?>
      <configuration>
         <system.webServer>
            <rewrite>
               <rules>
                  <rule name="Main Rule" stopProcessing="true">
                     <match url=".*" />
                     <conditions logicalGrouping="MatchAll">
                       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                     </conditions>
                     <action type="Rewrite" url="index.php" />
                  </rule>
               </rules>
            </rewrite>
         </system.webServer>
      </configuration>

      Next, update /lib/init.php and make the following change:

      // define("HTACCESS", file_exists(ROOTWEBDIR . ".htaccess"));
      define("HTACCESS", true);
  • No labels