82-logo
✕
  • Home
  • Services
  • Blog
  • Contact
82-logo
  • Home
  • Services
  • Blog
  • Contact
✕
  • Home
  • Services
  • Blog
  • Contact
Let's Talk

How to move Magento 2 to new domain

Published by andrei on February 22, 2023
Categories
  • e-commerce
  • Magento 2
Tags

1. Download your files and export your database ( mysqldump -u [username] -p old_db > old_db.sql )

2. Upload your files to new domain

3. Create new database

4. Import old database to the new one ( mysql -u [username] -p new_db < old_db.sql )

5. Change base url in your database:

UPDATE core_config_data

SET value = ‘http://newdomain.com/’

WHERE path IN (‘web/secure/base_url’, ‘web/unsecure/base_url’);

6. Change base link url to avoid redirects to old domain:

UPDATE core_config_data

SET value = ‘http://newdomain.com/’
WHERE path IN (‘web/unsecure/base_link_url’);

7. If is needed change root url:

UPDATE core_config_data
SET value = REPLACE(value, ‘http://olddomain.com/’, ‘http://newdomain.com/’)
WHERE path = ‘design/head/includes’;

8. Update database details in app/etc/env.php.

If you need help, get in touch!

Share
0

+1 (917) 341-4641

[email protected]

    Why Us?

    • We Are a Google Partner Agency
    • Over 10 years experience in Digital Marketing & E-commerce

    Schedule an online meeting

    © 2023 82 Marketing | All Rights Reserved
    0

    $0.00

    ✕

    Login

    Lost your password?

    ✕

    Your cart is currently empty.

    Subtotal: $0.00
    Total: $0.00
    Proceed to checkout View cart