2.8.4.5.2. Installing Phalcon Devtools

To install Phalcon Devtools, do the following:

  1. Connect to hosting via SSH.
  2. Make sure Phalcon switchedon in the PHP settings of the desired site.
    You can check the Phalcon version from the console with the command:
    /usr/local/php72/bin/php -c /home/account/.system/php/www.site.com.ini -r "echo Phalcon\Version::get();"

    In the command, substitute your data:

    • php72 — PHP version, established in the site settings.
    • accounttitle hosting account (not a pseudonym).
    • www.site.com — site name (if the site is on a subdomain, instead of www the name of the subdomain is indicated).
  3. Go to root directory site:
    cd website.com/www
  4. Create a file composer.json with the following content:
    {
        "require-dev": {
            "phalcon/devtools": "^3.4"
        }
    }
  5. Install Phalcon Devtools using Composer:
    composer install --ignore-platform-reqs
  6. Create the aliases required to run Phalcon Devtools through the console from any directory:
    echo "alias phalcon='/ usr / local / php72 / bin / php -c /home/account/.system/php/www.site.com.ini /home/account/site.com/www/vendor/phalcon/devtools/phalcon'" >> ~/.bashrc && source ~/.bash_profile

    In the command, substitute your data:

    • php72 — PHP version, established in the site settings.
    • accounttitle hosting account (not a pseudonym).
    • www.site.com — site name (if the site is on a subdomain, instead of www the name of the subdomain is indicated).
  7. Verify that Phalcon Devtools are working by running the command:
    phalcon info

    The command should display information about the environment, as well as the version of Devtools and Phalcon itself.

Content