In this tutorial we are going to learn about how to transfer the magento site from one hosting server to another hosting server manually using FTP. During this process we are not going to update the site url, since we are transferring hosting account only not the domain name.
Enable Maintenance Mode
Once you enable the maintenance mode no user can access the website, so its better to put the site in maintenance mode during the transfer process. To enable maintenance mode, create a file maintenance. Flag on your website root folder, check and confirm the site is under maintenance mode as below image
Backup Magento Files
One of the easiest ways to back up your magneto files is FTP, there are many FTP tools available like FileZilla, CoreFTP, Cyberduck or Others..
To download the files to the server, you need the following FTP credentials
- FTP Host
Using the FTP Credentials connect to the server and download the files.
Wait for a while till the download is complete in the mean while you can backup the database and be ready to transfer the server.
Backing up Database
Now we are going to get a copy of database, you can download the latest database using cpanel. Login to your cpanel then go to phpMyAdmin and Export the live database to the local system.
Now you have downloaded the files and database, you are ready to transfer the files to the new hosting account.
Upload Magento Files
Now you need to upload the magneto files to new hosting accounts, you can use FTP clients to upload. Login to the new hosting account using the FTP credentials, upload the files which you have downloaded to the local system during the process in Step 2. Make sure you upload all the files including the hidden files too, mostly htaccess and some server files are hidden.
Create and Configure Database
Now you have to create a MySQL database and assign a user with full access. To create the database, kindly logon to your new hosting account. After you create your MySQL database and assign a user, ensure that you note down the database credentials for further use.
- Database Name
- Username and
Kindly store the database credentials for the proceeding migration process.
Once you have created the database, then go to phpMyAdmin and Import the database which you have downloaded the Step 3 of this process.
Edit the config files
At this stage you have completed uploading the files to the server and imported the database to the new hosting account. Now you have to edit the cofiguration files to make the site work properly as in old hosting.
Use the credentials which you have used in Step 5. Replace your_db_username, your_db_password and your_opencart_database with appropriate values.
Set Permission for files and folders
All files and folders should have 644 permission and 755 permission respectively to avoid “Internal Server Error” if your Magento files and folders permission is not correct. You can change the file and folder permission settings via FTP or using cpanel default file manager.
After that, you can adjust again the permission of ‘media‘, ‘var‘, and ‘app/etc‘ directory to 777.
To remove the old site data and other information you need to clear the cache. To clear up the cache what you have to do is just go to /var/cache and delete all the files and content from there. You can do this using FTP or using cpanel default file manager, clearing the cache you are now completed the migration process.
Congratulations, you have successfully transferred your magento to another server or new hosting account.