> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing CakePHP manually

> Learn How To Install CakePHP Manually With Our Easy Step-By-Step Guide. Get Started Developing Quickly With This Powerful PHP Framework!

This article describes how to manually install the CakePHP web application framework on your hosting.com account.

<Note>
  Information in this article about unmanaged dedicated servers is only for customers who purchased those plans before May 27, 2024. As of that date, unmanaged dedicated servers are no longer available.
</Note>

## Installing CakePHP

CakePHP is compatible with all hosting.com accounts.

<Note>
  Although hosting.com servers are compatible with a wide variety of software applications, we cannot provide troubleshooting assistance for application-specific issues.
</Note>

To install CakePHP manually, follow these steps:

1. Download the CakePHP installation.zip file at [http://cakephp.org](http://cakephp.org) to your local computer.

2. Extract the .zip file on your computer.

3. [Use FTP](/docs/using-ftp-file-transfer-protocol) to upload the contents of the extracted *cakephp-cakephp-3d0ed9b* directory to the *public\_html* directory of your hosting.com account. (The exact name of the extracted directory differs based on the CakePHP version you download.)
   > 📘 Note
   >
   > * This step assumes that you want to install CakePHP in your account's document root directory. If you want to install CakePHP in a subdirectory instead, upload the files to the subdirectory instead.
   >
   > * If you have an unmanaged product (such as an unmanaged VPS or an unmanaged dedicated server), your document root directory may be in a different directory, such as */var/www/html*. Consult your Linux distribution's documentation for the document root directory location.

4. Create a MySQL database and database user for CakePHP. You will need this information during the configuration process.

   > 📘 Note
   >
   > * If your account includes cPanel, please see [this article](/docs/managing-mysql-databases)for information about how to create a MySQL database and user.
   >
   > * If your account does not include cPanel, you can create a MySQL database and user from the command line. For information about how to do this, please see [this article](/docs/managing-mysql-databases-and-users-from-the-command-line).

5. Using the [cPanel File Manager](/docs/cpanel-file-manager) or the SSH command prompt, from the document root directory rename the *app/Config/database.php.default* file to *app/Config/database.php*.

6. Using the [cPanel File Manager](/docs/cpanel-file-manager) or the SSH command prompt, open the *app/Config/database.php* file in your preferred text editor.

7. Locate the following lines in the *database.php* file:

   ```
   public $default = array(
       'datasource' => 'Database/Mysql',
       'persistent' => false,
       'host' => 'localhost',
       'login' => 'user',
       'password' => 'password',
       'database' => 'database_name',
       'prefix' => '',
       //'encoding' => 'utf8',
   );
   ```

8. Modify the lines as follows:

   * In the **'login' => 'user'** line, replace *user* with the name of the database user you created in step 4.

   * In the **'password' => 'password'** line, replace the second instance of *password* with the password of the database user you created in step 4.

   * In the **'database' => 'database\_name'** line, replace *database\_name* with the name of the database you created in step 4.

   * If you want to use a table prefix in the database, specify a value in the **'prefix' => ''** line.

   > 👍 Tip
   >
   > You can also configure an optional test database. To do this, modify the **\$test** array with the values for your test database.

9. Save your changes to the *database.php* file and exit the text editor.

10. Using the [cPanel File Manager](/docs/cpanel-file-manager) or the SSH command prompt, open the *app/Config/core.php* file in your preferred text editor.

11. Locate the following lines in the *core.php* file:

    ```
    /**
     * A random string used in security hashing methods.
     */
            Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');

    /**
     * A random numeric string (digits only) used to encrypt/decrypt strings.
     */
            Configure::write('Security.cipherSeed', '76859309657453542496749683645');
    ```

12. Modify the lines as follows:

    * In the **Configure::write('Security.salt'** line, modify or completely replace the salt value. The salt value can be anything you want.

    * In the **Configure::write('Security.cipherSeed'** line, modify or completely replace the cipher seed value. The cipher seed value can be anything you want, but it must contain only digits.

13. Save your changes to the *core.php* file and exit the text editor.

14. Use your web browser to go to the CakePHP URL.

    > 📘 Note
    >
    > If you copied the CakePHP files to the document root directory in step 3, the installation URL is your domain name (for example, *[http://www.example.com](http://www.example.com)* ). If you copied the CakePHP files to a subdirectory in step 3, add the subdirectory's name to the URL.

15. The CakePHP default page appears. You should receive a series of green notification messages about the configuration. You should not receive any red error notification messages.

    > 📘 Note
    >
    > You may receive a notification message about [DebugKit](https://github.com/cakephp/debug_kit). This is an optional component that you can install separately.

16. CakePHP is now installed and configured.

## Configuring the CakePHP console

CakePHP includes a command-line console for creating and managing applications. To configure your shell environment so you can start the console from any directory, follow these steps:

1. Log in to your account [using SSH](/docs/using-ssh-secure-shell).

2. To make sure you are in your home directory, type the following command at the command line:

   ```bash theme={null}
   cd ~
   ```

3. Edit the *.bash\_profile* file in your home directory using your preferred text editor. The *.bash\_profile* file should contain the following configuration:

   ```
   # .bash_profile

   # Get the aliases and functions
   if [ -f ~/.bashrc ]; then
       . ~/.bashrc
   fi

   # User specific environment and startup programs

   # Set path for CakePHP console:
   PATH=$PATH:$HOME/public_html/lib/Cake/Console
   export PATH
   ```

   > 📘 Note
   >
   > You may need to modify the **PATH** line above to match the exact path to the *lib/Cake/Console* directory on your own account.

4. Save your changes to the *.bash\_profile* file and exit the text editor.

5. To make the settings in the *.bash\_profile* file take effect immediately, type the following command:

   ```bash theme={null}
   source ~/.bash_profile
   ```

6. To verify that the CakePHP console starts, type the following command:

   ```bash theme={null}
   cake
   ```

   You should see the **Welcome to CakePHP Console** message.

   > 👍 Tip
   >
   > For more information about how to use the CakePHP console, please visit [http://book.cakephp.org/2.0/en/console-and-shells.html](http://book.cakephp.org/2.0/en/console-and-shells.html).

## More information

For more information about CakePHP, please visit [http://cakephp.org](http://cakephp.org).
