How to Migrate your Magento Site to AccuWeb.Cloud?
Migrating a Magento site involves transferring both the files and the database to the AccuWeb.Cloud, configuring the environment, and updating necessary settings. Here are the steps to successfully migrate your Magento site to AccuWeb.Cloud.
Step 1: Log in to AccuWeb.Cloud Dashboard
- Navigate to AccuWeb.Cloud: Open your web browser and go to AccuWeb.Cloud.
- Login: Enter your credentials (username and password) to access your AccuWeb.Cloud dashboard.
Step 2: Install Magento from the Marketplace
1. Access the Marketplace: Click on the “Marketplace” tab in your AccuWeb.Cloud dashboard.
2. Select E-commerce: Navigate to the e-commerce section.
3. Install Magento: Click on the Magento standalone install.
Step 3: Backup Your Old Site
1. Backup Files:
- Using FTP/SFTP: Use an FTP client (like FileZilla) to download all the files from your old server to your local machine.
- Using Command Line: Alternatively, use command-line tools like scp or rsync to transfer files.
scp -r user@oldserver:/path/to/magento /path/to/local/backup
2. Export Database:
- Using phpMyAdmin: Navigate to phpMyAdmin on your old server, select your Magento database, and export it in SQL format.
- Using Command Line:
mysqldump -u username -p database_name > database_name.sql
Step 4: Deploy Your Code
1. Upload Files:
- Using FTP/SFTP: Use an FTP client to upload your Magento files to the new server.
- Deploy Code: Follow the instructions provided in the AccuWeb.Cloud Environment Deployment Guide to deploy your Magento code. Here, I am deploying your code using an archive zip file if preferred.
Step 5: Import the Database
1. Transfer Database Dump to the New Server:
- Using SCP:
scp database_name.sql user@newserver:/path/to/destination
2. Import Database on the New Server:
- Using phpMyAdmin: Navigate to phpMyAdmin on your new server, create a new database, and import the SQL file.
- Using Command Line:
mysql -u username -p new_database_name < database_name.sql
Step 6: Update Configuration
- Update Database Configuration: Edit the app/etc/env.php file with the new database credentials.
return [
    'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => 'new_database_host',
                'dbname' => 'new_database_name',
                'username' => 'new_username',
                'password' => 'new_password',
                'active' => '1',
            ]
        ]
    ]
];
- Update Base URLs: If your domain changes, update the base URLs in the core_config_data table.
UPDATE core_config_data SET value = 'http://newdomain.com/' WHERE path = 'web/unsecure/base_url';
UPDATE core_config_data SET value = 'https://newdomain.com/' WHERE path = 'web/secure/base_url';
After successfully migrating your Magento site, you will be able to view this in your browser.