Technical Solutions

Magento - Transfer to test server

Posted Thursday, 07 August 2014 11:12

On the live server create a file backup and a database backup ( check your disk space first as Magento installations can be large )

Example with SSH

mysqldump -u DBUSER -p DBNAME > FILENAME.sql # Create a sql backup. You can do this via phpadmin if required

tar -czif ARCHIVENAME.tar.gz

Transfer files to your new environment using ftp and place in the root of your new site. Then after creating a duplicate named database, user and password ( you do not have to do this but it makes one step easier ) Restore the two backups

tar -zxvf ARCHIVENAME.tar.gz

mysql -h HOST -u USER -p DATABASENAME < FILENAME.sql

Now modify the local settings firstly in /app/etc/local/xml where you are looking for the block below. Change HOSTNAME, USERNAME, PASSWORD,DATABASENAME to match thos that you have created.

 

<connection>
                    <host><![CDATA[HOSTNAME]]></host>
                    <username><![CDATA[USERNAME]]></username>
                    <password><![CDATA[PASSWORD]]></password>
                    <dbname><![CDATA[DATABASENAME]]></dbname> 

Then modfy the table core_config_data, chanmging the records for web/secure/base_url and web/unsecure/base_url to match you servers domain name

After that delete the cache from the root of the new server by 

rm -rf var/cache/* var/session/*

And reindex the tables with 

php shell/indexer.php reindexall

 

 

Read 1615 times Last modified on Saturday, 09 August 2014 11:48

Contact

Invalid Input
Invalid e-mail address
Invalid Input
Invalid Input
Invalid Input
This form collects your name , email, and phone number so that we can get back to you. Please indicate that you consent to this below and then you will be able to contact us via this form.
Invalid Input

Find Us

 

Contact Details

Sussex PC Works
9 Barclays Court,
Skeyne Drive,
Pulborough RH20 2BG
UK

Tel: 01903680683

©2018 Rhino All rights reserved

This site uses cookies and other tracking technologies to assist with navigation and analyse your use of our website and services.