Uploading a Magento install
I have spent a long time building 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:
copy all of your local files to production server
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:
edit app/etc/local.xml file and change database info
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/
You have to set the permissions to 755 to index.php and all folders.
Export magento database from localhost and import it in server MySQL.
Go to app/etc/local.xml . Change all attributes i.e. localhost, username, database name and password.
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'.
Related
I have a .sql file (db) which I am trying to import using myphpadmin and keep getting a time out error.
The file is 46.6 MB (zipped)
Please note I am not on XAMPP but using a Godaddy myphpAdmin platform to manage the database.
What I've tried:
Re-downloaded the file as a zip file - and tried importing it. Still failed.
For this option given in phpmyadmin import, I tried UNSELECTING this option > "Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. (This might be a good way to import large files, however it can break transactions.)"....and I also tried importing the db keeping it selected, but this failed. Which should it be?
What else can I do?
nothing worked, except SSH.
What you need:
Database (that you are importing into) username and password
Cpanel username and password + IP address (for Putty)
I had to upload the .sql file to a folder on the public_html.
Download pUtty
In putty I needed the IP address (hosting server) as well as the cpanel username and password (so have that handy).
Once in, you have to enter your cpanel's password
Use the "cd" change directory command to change directory to where you have placed your .sql file.
Once there, use the following command:
mysql -p -u user_name database_name < file.sql*
(Note: replace 'user_name', 'database_name', and 'file.sql' with the actual name.)**
You will be prompted for your database password, and then your database will be imported.
Useful link: https://www.siteground.co.uk/kb/exportimport-mysql-database-via-ssh/
You can try unzipping the file locally and importing the uncompressed .sql file; the overhead of uncompressing the file in memory could be the problem for phpMyAdmin. Generally, though, what Shadow said is correct and you should use some other means for import (like the command-line client). You could also use the phpMyAdmin UploadDir feature to put the file on the file in a special folder that phpMyAdmin can directly access on the server. This can help with a lot of the resource limits the webserver imposes.
I'm hosting my db using AWS RDS and I'm trying to backup tables. However once it's finished backing up, where is the downloaded on my computer?
Doesn't seem like theres a path to save the file
I've checked a couple of answers and others are having same issue
https://stackoverflow.com/a/29246636/11110509
The "Filename" element in that dialog box lets you pick a directory as well as file name. That is where it is. If you just typed in a filename without giving a path, then on Windows it is probably in your user's "Documents" folder.
I have a prestashop store.I have downloaded the source from ftp and imported the database as well.I want to set it up on my localhost.I am using wamp on windows 7.I have set my db credentials in setting.inc.php.When I access the front end it redirects me to the live url.The admin is ok ie its accessing through localhost.
I have edited the ps_shop_url table and changed the domain and domainssl to localhost and physical url to /myproject/.
I have also changed the ps_configuration table and changed PS_SHOP_DOMAIN = localhost and PS_SHOP_DOMAIN_SSL=localhost
I have also deleted my .htaccess file.
But the issue is still there.It redirect me to the live url.I have spent alot of time but in vain.Kindly help me I am new to prestashop.I have installed prestashop 1.6 version.
How to migrate PrestaShop from Your web server to local? (and inversely)
25 July 2015 Tutorials
That task is quite easy in most cases. But you must remember about few essential things.
Moving from SERVER to LOCAL PC
I assume you’ve configured PHP, Apache and MySQL on your local machine. If you don’t have those things installed, find some informations about how to do it. If you are using Windows I can suggest you installing XAMPP application.
Download all website files from your FTP and put them to the local directory.
Next, let’s export the database from phpMyAdmin to the .sql file and download it. Import that file to your local database.
Now it’s a time to make some changes in your local database, files and BackOffice.
Database:
Go to the table PS_SHOP_URL and change values of following columns:
– domain localhost
– domain_ssl localhost
– If your PrestaShop is located in some addictional directory, set the value of physical_uri (for example, if it’s in the ‘shop’ directory, write /shop/ there)
In the PS_CONFIGURATION table change the value of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL
Files:
Set the debug mode ON in config/defines.inc.php
define('_PS_MODE_DEV_', true)
Set your local database parameters in config/settings.inc.php
If your PrestaShop is located in some addictional directory (for example /shop/), edit the .htaccess file. It’s located in PrestaShop main folder. Add to this part…
RewriteRule . - [E=REWRITEBASE:
1
RewriteRule . - [E=REWRITEBASE:
…that directory. Complete code should look like this:
RewriteRule . - [E=REWRITEBASE:/shop/
1
RewriteRule . - [E=REWRITEBASE:/shop/
BackOffice:
Advanced Parameters -> Performance
Select “Force compilation” in smarty settings, disable the cache and clear the cache using button located in upper right header of page.
There is a possibility to install Owncloud with a php script setup-owncloud.php.
I have uploaded this file to my domain.
and startet the script with the Webbrowser.
I found out it has downloaded the files to the server, so far the script is working.
then it will request a admin name/pwd a db name, db user and db pwd.
I add this information hit the next button - then nothing happen except a white page (no error, no Information)
if i go to www.domain.com/owncloud/
the starting page come requesting again a admin name/pwd a db name, db user and db pwd
so the information are not stored nor the page corectly started
thanks for feedback
have a nice day
vinc
I think your file is not named correctly. The setup file with your values for database, etc, is
config/config.php
I am trying to create an exact mirror of a Magento production server on my local server for further development, but I have run into a few issues.
On the production server, our Magento is configured to run without displaying the index.php, but after attempting a migration to my local server, the index.php is required to access any links. Additionally, when I select a category to visit (for example), I am directed to http://localhost/category.html instead of http://localhost/my-magento-store.com/index.php/category.html
The other issue I've noticed is that I am unable to log in to the admin section. After entering the correct login credentials, I am redirected to the login screen again without any error messages.
I am running a MAMP stack on the local server, and here is what I have done:
Created a tar of the entire production server
Created a database backup in Magento System > Tools > Backups
Downloaded and extracted tar into local directory
Imported database dump into local MySQL using Alexey Ozerov's big dump script. (The .sql file is 1.3m lines)
Changed values of web/unsecure/base_url and web/secure/base_url in core_config_data table. (As I don't have a self-signed SSL cert, I put http://localhost:8888/my-magento-store/ for both values)
Dumped contents of var/cache and var/sesson
Changed permissions to 755 for all files on local dev server
Navigated to http://localhost:8888/my-magento-store/ but got the "Index of /" page instead.
Navigated to http://localhost:8888/my-magento-store/index.php and got an error.
Followed these steps to solve the error, reloaded the page, and the home page loaded correctly.
Any ideas?
URL Rewriting depends on your .htaccess file, so there are a couple of things to check:
web/seo/use_rewrites in core_config_data should be true.
when you created your tarball, did it include . files in the root directory especially .htaccess? If you used tar -cvf archive.tar * then it may have missed them. (Nice "feature" of *nix).
Check that your MAMP httpd.conf has AllowOverride All, otherwise your local .htaccess will be ignored.
I'm not familiar with MAMP, but it's possible that it's having a problem reading/interpreting your .htaccess, though this is unlikely. I'd focus on options 1 thru 3 first.
HTH,
JD