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 proper permissions and file ownership, 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 files data/config-internal.php and 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' => 'https://new-link.com',

default file owner (only if the new web server has a different user/group):

'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.

Now, your EspoCRM instance is running on the new server.