Friday 7 March 2014

Move Magento from one server to another


Hi You can easily  move Magento website from one server to another server in 3 very easy steps.

1. Delete the content of the folder /var   // it contains cache and session files dont worry about this just delete this

2. Change the values of the file /app/etc/local.xml There you can find your connection string data (database user, host and name).

3. Once you got your database uploaded, you need to make some changes.
Run this query:
You gonna get something like this:
Now, change that values for your new url, run below query.
If you run the first query, now you gonna get something like this:

PgSQL
1
2
3
4
5
6
+-----------+---------+----------+-----------------------+------------------------------+
| config_id | scope   | scope_id | path                  | value                        |
+-----------+---------+----------+-----------------------+------------------------------+
|         2 | default |        0 | web/unsecure/base_url | http://www.somedomain.com/ |
|         3 | default |        0 | web/secure/base_url   | http://www.somedomain.com/ |
+-----------+---------+----------+-----------------------+------------------------------+