Installing Laravel on your hosting account is a simple process, thanks to the new tools we have implemented. You can now activate Composer and other essential modules without needing to contact our support team. Below, we show you the steps to install Laravel on your hosting account or how to migrate a Laravel project from your local environment.
Composer activation (Developer tools)
Previously, activating Composer required intervention from our support team. Now, this process has been simplified and you can activate it directly from the control panel. Follow these steps:
- Log in to your cdmon account and access your hosting management from our control panel:
- From the hosting management section, look for "File managers" and select the option "Hosting for developers".
- Inside this section, you will find a button that allows you to activate the service. You just need to click the button to start the activation.
Migrate your Laravel from your local environment to the hosting Most Laravel installations are developed locally and later published. In the following steps, we show you how to upload a Laravel installation to a cdmon hosting account:
1. Prepare the project locally
Compress your Laravel project:
Create a copy of the local database:
2. Create the database in cdmon
Access the hosting management:
Create a new MySQL database:
Save this information (database name, username, and password), as you will need it to configure your Laravel project on the server.
3. Upload the files to the hosting
1. Connect to your server using FTP:
Use an FTP client such as FileZilla to connect to your cdmon hosting account. Enter the hosting FTP credentials to connect. You can find more details about how to connect in our FileZilla connection guide.
2. Upload the compressed file:
Extract the compressed file:
4. Configure Laravel on the hosting
Modify the .env file:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_MySQL_username
DB_PASSWORD=your_MySQL_password
Import the database:
Now you need to import the database you exported from your local environment. You can do this using FTP and the database import tool available in our control panel:
The fields to complete refer to the following:
- Database: select the destination database you created earlier.
- Encoding: select UTF8 or LATIN1 depending on the database encoding (usually UTF8).
- File: the name of the file you want to load into the database.
Once the process is finished, you will receive an email indicating whether the execution was successful.
By following these steps, you can migrate your Laravel project from a local environment to your cdmon hosting account. We have simplified and detailed each step to make the process as clear as possible.
If your Laravel application uses caching, job queues, or other additional services, make sure to configure and test these services on our hosting.
Installing a new Laravel on the hosting Once Composer is active on the hosting account, you can install Laravel. You must access your hosting via SSH to complete these steps.
Install Laravel manually
To do this, use the following command inside the folder where you want to install Laravel:
composer create-project --prefer-dist laravel/laravel app-name
Composer will download and install Laravel and its dependencies in the project folder.
Once downloaded, the next step is to configure Laravel’s .env file. Inside your Laravel project folder, you will find a file called .env. This file contains your application configuration. Open it and configure the environment variables, such as database settings and security keys, according to your needs. Where to find MySQL connection details To verify that Laravel has been installed correctly, open the command console and run:
laravel --version
IMPORTANT: These steps apply when starting a completely new Laravel project. Most Laravel applications are developed locally and then uploaded to our hosting. In that case, the installation process is completely different. We suggest reviewing the Laravel migration section above if that applies to you.
We also want to mention that if you run phpinfo from the console, you can see all the modules active on the hosting account (after manually activating Composer and PHP). If you press the Tab key twice, the command console will display all available commands for your SSH user.