开发者

How do I transfer a local Magento install onto my live server?

How do I transfer a local Magento install onto my live server?

Uploading a Magento install

I have spent a long time bui开发者_如何学Golding a store with Magento on my local development PC.

Now that I am happy with the result, I would like to upload it to my live production server.

What steps must I complete to ensure this move is as easy as possible?


moving files and database

I assume these two steps are obvious:

  1. copy all of your local files to production server
  2. dump your magento local db and import it into your production server db

editing in production server

now on your production server you need to follow these two steps:

  1. edit app/etc/local.xml file and change database info

  2. in production db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:


     SELECT *
     FROM `core_config_data`
     WHERE `value` LIKE 'http://%';

edit (thanks to comments):
3. Do not forget to delete var folder contents
4. Optionally remove this file too app/etc/use_cache.ser


Best way would be to make a fresh install.

Change the URL of the site to the live one before exporting the database. Import your database into the live server. Download and unzip the Magento files. Edit the etc/local.xml file to set the database details.

Once you visit the URL, Magento will do all the required Database fixes and upgrades.

Copy the template into the folders.

Reinstall all modules (if you've used any).

You can move the site by other ways too... Check the following links.

Ref:

  • http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
  • http://www.magentocommerce.com/wiki/how_to/moving_magento_to_another_server
  • http://www.magentocommerce.com/boards/viewthread/27272/
  • http://activecodeline.com/moving-magento-site-from-development-to-live-server
  • http://abhinavzone.com/moving-magento-site-from-development-server-to-live-server/


Don't change core files, instead either overload them via custom modules or, if absolutely necessary, replicate them in the app/local folder, which ensures that the modified versions get loaded instead of the standard files.
Deployment is handled like this:
I keep all Magento source files under version control, Subversion specifically. When I've tested my changes, I just submit them to the Subversion server and then export (or update) them on the production server. That way, I don't need to upload the whole site again, only the changed files get updated. Using the auto-installing extensions mechanism ensures that extensions are installed on the production server as they were on the development server. The only thing that's needed now is to adjust database settings for the new extensions on the production server (something that can also be handled by the extensions mechanism).


Its very easy to do, i did it and i made a document of it. all you have to do is add these lines in your sql file.

Place these lines of SQL code on very top of the .sql file: 
SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;
Place these lines of SQL code on very end of the .sql file: 
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
SET SQL_NOTES=@OLD_SQL_NOTES;

for more details

http://findgodaddyhostingreview.com/2010/06/how-to-move-magento-from-production-to-live-server/


  1. You have to set the permissions to 755 to index.php and all folders.
  2. Export magento database from localhost and import it in server MySQL.
  3. Go to app/etc/local.xml . Change all attributes i.e. localhost, username, database name and password.
  4. Open the file app/etc/local.xml.template . Change the respective attributes.

That's it. Hope it works for all. :)


If you want to move your installation form directory to top domain or one domain to another , you need to follow this setps.

1) Delete the content of the folder /var

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:

SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';

You gonna get something like this:

+-----------+---------+----------+-----------------------+--------------------------------------+
| config_id | scope   | scope_id | path                  | value                                |
+-----------+---------+----------+-----------------------+--------------------------------------+
|         2 | default |        0 | web/unsecure/base_url | http://www.tudominio.com.ar/magento/ |
|         3 | default |        0 | web/secure/base_url   | http://www.tudominio.com.ar/magento/ |
+-----------+---------+----------+-----------------------+--------------------------------------+

Now, change that values for your new url.

UPDATE core_config_data SET value = 'http://www.tudominio.com.ar/' WHERE path LIKE 'web/%/base_url';

If you run the first query, now you gonna get something like this:

+-----------+---------+----------+-----------------------+------------------------------+
| config_id | scope   | scope_id | path                  | value                        |
+-----------+---------+----------+-----------------------+------------------------------+
|         2 | default |        0 | web/unsecure/base_url | http://www.tudominio.com.ar/ |
|         3 | default |        0 | web/secure/base_url   | http://www.tudominio.com.ar/ |
+-----------+---------+----------+-----------------------+------------------------------+

That’s all.

For more info visit : http://webdesignergeeks.com/cms/magento/move-magento-from-local-server-to-live-server-without-fresh-installation/


I find in web/unsecure/base_url in magecore_config_data database, if you search core_config_data and see it is empty table, please search something like magecore_config_data. this mag that become in first part is asked of you when you install Magento as a prefix for Magento tables.

And one another point, I use wamp 2.2 and when I search databases in phpmyadmin that filtered only databases in that page, please change pages and search again.


I follow this tutorial http://magentoexplorer.com/how-to-move-or-transfer-magento-from-localhost-to-live-server and succeeded to move my Magento installation from Localhost (XAMPP) to live server. Simply, you can follow these 5 steps:

1. Export database of Magento site (SQL file)

Open PHPmyadmin to export your database to SQL file or you can run this command from SSH mysqldump -uUSERNAME -pPASSWORD DATABASE > backup.sql

2. Upload code of Magento site to live server

Upload all files/folder from your localhost to live site using FTP client, you can zip and unzip file to make sure all files are preserved

3. Import database to live server and change database configuration.

Again, use PHPmyadmin to import the .sql file we export in step 1 or run this command from SSH mysql -uUSERNAME -pPASSWORD DATABASE < backup.sql

4. Replace local URL with live site URL in database

Find the table core_config_data and edit url in column web/unsecure/base_url and web/secure/base_url to the domain of your live site

5. Pointing your domain to server’s IP

Hope this helps


After completion of building an eCommerce website in localhost with lots of efforts configure all other settings in localhost. Some of them are struggling to Upload their store from localhost to live server, where even our team faced this problem in the beginning.

HOW TO UPLOAD MAGENTO SITE FROM LOCALHOST TO LIVE SERVER

Now from this tutorial, I am going to show you how to successfully Upload Magento site from localhost to live server. Here are the most important steps to make your shop live from localhost to your live production server.

Step 1: Make a zip of your Magento Working Files.

Select Magento working files from your local server. And then Just go to htdocs folder( if XAMPP) or www folder ( if WAMP) later go to Magento folder and then compress all the files in the zip folder.

Step 2: Open your Database using phpMyAdmin

Open your control panel (Xampp/Wamp) and Start Apache and MySQL. After that, visit localhost/phpmyadmin and then open your Magento Database.

Step 3: Type these SQL query: Here I have used m22 as my database name

Select * from m22.core_config_data where value like ‘%127.0.0.1%’

Step 4: Change 127.0.0.1 or localhost to your domain URL

After entering the query in SQL command line you will find a result in phpMyAdmin window. Change 127.0.0.1 or localhost to your domain URL as shown in below images.

Example:

UPLOAD MAGENTO SITE FROM LOCALHOST TO LIVE SERVER

Step 5: Export MySQL full database [3] After completing your previous step, you have to Export/dump your full database. In our case we used Xampp shell command prompt to dump the database as shown in below images.

Example: Export using Xampp shell command prompt

HOW TO UPLOAD MAGENTO SITE FROM LOCALHOST TO LIVE SERVER

Step 6:Create Database in C-panel using username and password

After Logging into your C-panel. Create new database with username and password credentials in MySQL database wizard.

Step 7: Upload the Database files

Upload localhost database file (From Step 5) in phpMyAdmin using C-Panel

Step 8: Upload the zip file in file manager

Upload Magento working files (From Step 1) in File Manager using C-Panel

Step 9: Connect your Magento file with your database

After uploading your Magento work file, Go to app folder and follow the steps given below:

Go to root folder -> app -> etc -> local.xml.sample

Rename local.xml.sample to local.xml

Change the user credential (username and password given in database from Step 6) [4]

<host>your_host_name]]></host>
<username>your_user_name]]></username>

<password>your_database_password]]></password>

<dbname>your_database_name]]></dbname>

Save the changes

Example: HOW TO UPLOAD MAGENTO SITE FROM LOCALHOST TO LIVE SERVER

Step 10: Create and clear cache memory

Create _cache folder in Magento -> var

Open the cache folder in Magento- > var and select all cache files and then choose delete.

Step 11: Change cache directory

Create a temp folder in Magento

Open magento/lib/Zend/Cache/Backend/File.php and look for:

protected $_options = array(
‘cache_dir’ => ‘null’,
Change it to:
protected $_options = array(
‘cache_dir’ => ‘tmp/’,
Save it.

Step 12: Clear browser cookies and reload the page

After you have done all the above steps successfully, your Magento site is now completely uploaded on your own domain from localhost. Now you can check in the browser by entering your domain name and press enter. You are now amazingly viewing your online store if you have completed all above steps as mentioned. Now the online Store looks exactly what you viewed in your localhost.

for more information visit : http://www.instasoftech.com/blog/how-to-upload-magento-site-from-localhost-to-live-server/


I recently moved a full Magento install complete with a couple of extensions. I found it as simple as copying the directory structure, changing the BASE_URL in config_data and changing the database info in 'local.xml'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜