Skip to content

Moving EspoCRM to another server

Follow these steps to move EspoCRM to another server:

Step 1. Backup files

Open a file manager or login via SSH to archive all available files from the EspoCRM directory. See more details.

Step 2. Backup your database

The data stored in the database (MySQL, MariaDB) should be backed up. Please, follow this recommendation.

Step 3. Copy files and database backups to another server

Copy the backups of files and your database to a new server.

Step 4. Unarchive backup files

To unarchive the backup files, you can use Archive Manager or this instruction. Note: Files need to be placed in the web-server directory.

Step 5. Configure a server

Configure a new server based on the recommendations here.

Step 6. Correct permissions

Set required permissions and files owner, see here.

Step 7. Import your database backup

First, you have to create a new database with a user in MySQL. To import your database from the backup, follow these instructions.

Step 8. Correct EspoCRM configurations

After successfully importing and configuring the server, please correct EspoCRM configurations in the file ESPOCRM_DIRECTORY/data/config.php:

database connection settings:

'database' => [
    'driver' => 'pdo_mysql',
    'dbname' => 'YOUR_DATABASE_NAME',
    'user' => 'YOUR_USER',
    'password' => 'YOUR_DATABASE_PASSWORD',
    'host' => 'localhost',
    'port' => '',

siteUrl - if your domain name (URL) is changed:

'siteUrl' => '',

default files owner (only if different):

'defaultPermissions' => [
    'user' => 'www-data',
    'group' => 'www-data',

where www-data is your web-server user.

Step 9. Setup a crontab

Setup a crontab.

Note: it should be configured under your web-server user.

That's all. Now, your EspoCRM instance is running on a new server.