Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problems when moving Magento to an other server
 
JeanMic
Jr. Member
 
Total Posts:  1
Joined:  2013-07-31
 

Hello,

I\\\\\\\’m trying to move a magento website from a server to another.  I\\\\\\\’ve been experiencing a lot of problems doing it, but i finally obtained a little success by :
- copying the website files on the new server and importing the database
- using the directory where i copied the files as apache root directory
- giving the good rights with chmod/chown and configuring apache properly
- changing the database connection on app/etc/local.xml, app/etc/config.xml and index.php, and changing the web secure/unsecure url on the core_config_data table of my database

I can now access a page which is almost similar to the front page of the former website in local, but i still have some problems.

- the path of the files on the server is not always correct. Assuming that i\\\\\\\’m using the local url http://test.com, the generated html front page is sometimes using paths like \\\\\\\” http://test.com/example1 \\\\\\\”, and sometimes using paths like \\\\\\\” http://test.comexample2 \\\\\\\”. The values in the core_config_data are of course \\\\\\\” http://test.com/ \\\\\\\”. I picked the generated code and added the \\\\\\\” / \\\\\\\” on the right places, and it gave me exactly the same front page as the former website.

- my other problem is that none of the links of the new website are working… Though, i noticed that one of the path (let\\\\\\\’s call it example.html) didn\\\\\\\’t correspond to anything in the website files, but matched an entry of the core_url_rewrite table that refers to a path in the /media file. Thus I\\\\\\\’m assuming that there is simply a little problem in the rewrite system that shouldn\\\\\\\’t be too hard to correct.

I\\\\\\\’m not the one who coded the website originally, and I only have basic knowledge in html, php, js, etc… I also don\\\\\\\’t want to try to reinstall the website with another method, because the files are huge and it already took me a lot of time to locally access the front page of the website. I would really appriciate any help or any kind of idea to solve these problems.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
eCommerceBKK
Jr. Member
 
Total Posts:  8
Joined:  2010-06-16
 

Download this file and extract it into the root folder: http://www.magentocommerce.com/_media/magento-check.zip

Go to yourdomain.com/magento-check.php - This will give you a rundown as to whether or not you\’ve got PHP setup correctly.

You shouldn\’t have to change the database connection configuration anywhere except app/etc/local.xml

Make sure the web server has url rewrites enabled

There is no need to change anything in the core_config_data table unless the domain changed (or SSL has changed)

If you have SSH access to the old system, you just want to tar the Magento root folder and preserve the permissions:

tar cpzf ww.dingdong.com.tar.gz http://www.dingdong.com

Then you want to dump the database:

mysqldump -u root -pPassword database_name > database_name.sql

Transfer the files http://www.dingdong.com.tar.gz and database_name.sql to the new server

Then extract the tar file in the web root:

tar xpzf http://www.dingdong.com.tar.gz

After you have created the empty database using the same database name as before, restore the contents from your database dump:

mysql -u root -pPassword database_name < database_name.sql

If the database name or user or password has changed, make the corresponding changes in app/etc/local.xml

Delete all files in Magento root/var/cache Magento root/var/session/ and Magento root/var/locks

If the server (Apache, PHP, MySQL) is configured correctly, the website should just fire right up.

If the user www-data is not the owner of all the files, it is important to put the user www-data into the owner\’s group and give the group read and write permission to all files.

If you don\’t have SSH access to either of the servers, you are going to take hours to do a job that should really only take minutes to accomplish.

Good Luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
zesttech
Member
 
Total Posts:  31
Joined:  2012-04-30
London, UK
 

Hi,
If both the Magento servers are of same version, then you can carry out the following :

1)Go to your test site backend and refresh cache by system > cache management. Then take a backup of test site phpmyadmin database by exporting database in to “dbname.sql.zip” format (or any suitable format).

2) Take a backup of below folders on the test site to your system
Contents inside frontend folder (app\design\frontend)
Contents inside frontend folder (skin\frontend)
Catalog & other required folders (media\catalog)

3) Install a new magento store in to the new server.
Go to the new server phpmyadmin database and delete all the tables.
4)Unzip backup database on the first step “dbname.sql.zip” and import “dbname.sql” file to the new database.
Copy below folders to their respective new magento server directory
Contents inside frontend (app) folder to app\design\frontend.
Contents inside frontend (skin) folder to skin\frontend.
Catalog & other required folders to media\catalog, xx\

5)Edit base URL mentioning table (core_config_data table) on the new magento.
web/unsecure/base_url > http://www.newsite.com/
web/secure/base_url > http://www.newsite.com/

6) Go to your sites admin panel System > Cache management > Select all & disable cache management. And also index data by go to System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit.
Check your new magento store...

 
Magento Community Magento Community
Magento Community
Magento Community
 
zesttech
Member
 
Total Posts:  31
Joined:  2012-04-30
London, UK
 

Hi,
If both the Magento servers are of same version, then you can carry out the following :

1)Go to your test site backend and refresh cache by system > cache management. Then take a backup of test site phpmyadmin database by exporting database in to “dbname.sql.zip” format (or any suitable format).

2) Take a backup of below folders on the test site to your system
Contents inside frontend folder (app\design\frontend)
Contents inside frontend folder (skin\frontend)
Catalog & other required folders (media\catalog)

3) Install a new magento store in to the new server.
Go to the new server phpmyadmin database and delete all the tables.
4)Unzip backup database on the first step “dbname.sql.zip” and import “dbname.sql” file to the new database.
Copy below folders to their respective new magento server directory
Contents inside frontend (app) folder to app\design\frontend.
Contents inside frontend (skin) folder to skin\frontend.
Catalog & other required folders to media\catalog, xx\

5)Edit base URL mentioning table (core_config_data table) on the new magento.
web/unsecure/base_url > http://www.newsite.com/
web/secure/base_url > http://www.newsite.com/

6) Go to your sites admin panel System > Cache management > Select all & disable cache management. And also index data by go to System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit.
Check your new magento store...

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top