Mautic Community Forums

Move from Test To Live Process

I have Mautic in a test environment and now would like to move it over to a live environment…



Of course the whole MySQL can be backed up and I could copy the entire directory to the new location…but I am not sure what files in the directory as well as in the MySQL DB need to be modified to reflect the new location and new DB…



I don’t know what files or info in the DB that needs to be changed to port over to a live system in new area…thanks in advance.



For example I know there is a:

YOURURL.com/app/config/local.php file that has things in it and some assume to change already (words in bold are me asking questions here).





‘db_name’ => ‘(NEW DB NAME)’,

‘db_user’ => ‘(USER IN NEW DB - OR DOES IT TAKE THE ORIGINAL USER)’,

‘db_password’ => ‘(NEW DB PASSWORD - OR DOES IT TAKE THE ORIGINAL PASSWORD)’,

‘db_table_prefix’ => ‘mautic_’,

‘secret’ => ‘(WOULD IT NEED A NEW SECRET)’,

‘default_pagelimit’ => 10,

‘cache_path’ => ‘%kernel.root_dir%/cache’,

‘log_path’ => ‘%kernel.root_dir%/logs’,

‘site_url’ => ‘(THE NEW URL)’,

‘install_source’ => ‘Mautic’,

‘db_path’ => null,

‘mailer_from_name’ => ‘(SAME OK HERE?)’,

‘mailer_from_email’ => ‘(SAME OK HERE?)’,

‘mailer_transport’ => ‘mail’,

‘mailer_host’ => null,

‘mailer_port’ => null,

‘mailer_user’ => null,

‘mailer_password’ => null,

‘mailer_encryption’ => null,

‘mailer_auth_mode’ => null,

‘mailer_spool_type’ => ‘memory’,

‘mailer_spool_path’ => ‘%kernel.root_dir%/spool’,

‘secret_key’ => ‘(CAN IT USE THE SAME SECRET KEY?)’,

I have Mautic in a test environment and now would like to move it over to a live environment…

Of course the whole MySQL can be backed up and I could copy the entire directory to the new location…but I am not sure what files in the directory as well as in the MySQL DB need to be modified to reflect the new location and new DB…

I don’t know what files or info in the DB that needs to be changed to port over to a live system in new area…thanks in advance.

For example I know there is a:
YOURURL.com/app/config/local.php file that has things in it and some assume to change already (words in bold are me asking questions here).

'db_name' => '(NEW DB NAME)',
'db_user' => '(USER IN NEW DB - OR DOES IT TAKE THE ORIGINAL USER)',
'db_password' => '(NEW DB PASSWORD - OR DOES IT TAKE THE ORIGINAL PASSWORD)',
'db_table_prefix' => 'mautic_',
'secret' => '(WOULD IT NEED A NEW SECRET)',
'default_pagelimit' => 10,
'cache_path' => '%kernel.root_dir%/cache',
'log_path' => '%kernel.root_dir%/logs',
'site_url' => '(THE NEW URL)',
'install_source' => 'Mautic',
'db_path' => null,
'mailer_from_name' => '(SAME OK HERE?)',
'mailer_from_email' => '(SAME OK HERE?)',
'mailer_transport' => 'mail',
'mailer_host' => null,
'mailer_port' => null,
'mailer_user' => null,
'mailer_password' => null,
'mailer_encryption' => null,
'mailer_auth_mode' => null,
'mailer_spool_type' => 'memory',
'mailer_spool_path' => '%kernel.root_dir%/spool',
'secret_key' => '(CAN IT USE THE SAME SECRET KEY?)',

The secret keys can be the same I think. DB credentials have to be correct so Mautic could use the database. We cannot tell you what credentials you have to put there. It depends on your database. If you want to access the same database as you used in the test environment, then do not change it. Mailer setting can be change from the configuration, so do not change it in the code and again, it depends on your needs if you want to use the same setting in the testing environment as in the production.

Don’t forget to clear cache every time you make a change in the config file.

It would be s different database…not writing to the same one.

The URL would have been something like test.URL.com

Now would be like live.URL.com

New database…

This was I could always test things in the test system before going to the live one…just need to take what is there and put into a live environment. I will go and copy over the directory to the new subdomain…create a new database and put in the proper db credentials…and change the configuration files above and clear the cache and then let you know.