mytheory. Posted September 15, 2010 Share Posted September 15, 2010 Hello,This is probably a simple question, but I figure an important one. We recently decided to move to a more stable environment by moving our PS installation to a new server/host. We have been testing our initial setup of PS on a windows server, but for our production server we have decided that a linux based VPS server would be the best option for our business.So the important question I have is... basically, what precautions do we need to take when moving our PS installation from our current server to our new hosted one??I figure it should be easy as just copying over the actual files/folders from the PS root directory and then directly dumping the mysql dump file into the new database... maybe changing some config files.However, is there anything more to this concept? Esp. since we are moving to different platforms and OS's? It is very important that all our files stay in tact (heavily modified core files, so no reinstall) and our images need to link correctly... we have over 6000 products with images (some with multiples)... so we can't afford to manual re-upload them, although regenerating them might be an option, although not ideal.Simple question... sorry for the long post.THANKS!! Link to comment Share on other sites More sharing options...
cupandacu Posted September 19, 2010 Share Posted September 19, 2010 I have a similar question actually. I have a site ready on running locally on WAMP. I want to upload it to a host. What is involved in this process?I am guessing mytheory and I would have to follow similar steps?Thanks Link to comment Share on other sites More sharing options...
naijabay Posted September 19, 2010 Share Posted September 19, 2010 I have this issue right now too any help will be appreciated Link to comment Share on other sites More sharing options...
carloalberto Posted September 19, 2010 Share Posted September 19, 2010 Hi, i did all the process this week, moving is easy.But the destination url must be LINUX based.You must copy the old SQL database in the new URL database (I had some problems exporting/importing big database - i had to export the database in 10 parts) .Then modify the SETTING.PHP file located into CONFIG whit new database address.if you do well these easy steps no worries about success!I do have now some problem with updating from 1.1.0.5 to 1.3.1. my problem: http://www.prestashop.com/forums/viewthread/70326/upgrading_prestashop/problem_configsettings_dot_inc_dot_php_file_was_not_foundI hope it helps!Carlo Link to comment Share on other sites More sharing options...
mytheory. Posted September 22, 2010 Author Share Posted September 22, 2010 HiI am in the process of making this transition... just start moving over the files and created a dump of the database to import into the new one on the linux machine.Could you explain a bit more on what you mean by "destination url"? Iknow that linux uses the other slash for it's file mapping, but exactly where would you have to make these changes. I suppose there are a lot of URl's that need to be changed...?Much Thanks! Link to comment Share on other sites More sharing options...
rocky Posted September 23, 2010 Share Posted September 23, 2010 You shouldn't need to change any of the slashes in PrestaShop's code. The only file you need to change is config/settings.inc.php with the new database details. You will need to change the base URL too if you are moving from a subdirectory to root or root to subdirectory. Link to comment Share on other sites More sharing options...
carloalberto Posted September 23, 2010 Share Posted September 23, 2010 You shouldn't need to change any of the slashes in PrestaShop's code. The only file you need to change is config/settings.inc.php with the new database details. You will need to change the base URL too if you are moving from a subdirectory to root or root to subdirectory. YES correct! the only file to change is config/settings.inc.php Link to comment Share on other sites More sharing options...
carloalberto Posted September 23, 2010 Share Posted September 23, 2010 HiI am in the process of making this transition... just start moving over the files and created a dump of the database to import into the new one on the linux machine.Could you explain a bit more on what you mean by "destination url"? Iknow that linux uses the other slash for it's file mapping, but exactly where would you have to make these changes. I suppose there are a lot of URl's that need to be changed...?Much Thanks! sorry my english is poor - i am italian, “destination url” means the url where you plan to move Prestashop.IMPORTANT: prestashop must be installed in LINUX Machine. Link to comment Share on other sites More sharing options...
mytheory. Posted September 23, 2010 Author Share Posted September 23, 2010 Oh OK. THANKS!We are still in the process of getting everything setup on our new server and preparing to move over the PS files and database, hopefully by today.I'll keep yall posted...Thanks again! Link to comment Share on other sites More sharing options...
mytheory. Posted September 27, 2010 Author Share Posted September 27, 2010 Just to give a quick update for anybody else interested...Like everybody else has said, the transition was quite easy. I had some concerns because we were moving from a Windows machine to a Linux one. However, once you get your new machine setup with apache and mysql... you just ftp you entire PS root directory to your new web directory on the new server. After this is complete, you dump your mysql file into a .sql file (I used mysql workbench for windows), then you import dump file into your new database.I had some problems here, but this was mainly due to my lack of understanding in regards to Linux and mysql. I found that the easiest way that worked for me was to ftp the dump (.sql) file into the web directory... then in the command line (SSH) change directory (cd) to your web directory where you have your .sql file, and then to run the following command...mysql -u dbusername -p databasename < dumpfile.sqlI had some problems because I was trying to run this command from outside of the directory where the sql file was contained.Then finally, I just changed the details in config/settings.inc.php. That was it! Also, if you run into minor problems make sure to set your file permissions according to the installation guide in the wiki. I tried to use higher security settings for some of the folders like my modules and img folder, but by doing so some of my modules didn't run correctly and some of my images in the BO didn't show up. But once I set them to chmod 777 everything seems to be running even better than before.Hope this helps somebody else. Link to comment Share on other sites More sharing options...
tester123 Posted October 4, 2010 Share Posted October 4, 2010 Could sbdy explain all about "dumbing the sql", thats the area I am not confident with.PLZ Link to comment Share on other sites More sharing options...
mytheory. Posted October 5, 2010 Author Share Posted October 5, 2010 I'll try my best to explain a bit more about creating a dump sql file. But I'm fairly new to mysql myself and all that I am writing about is what I have learned from alot of reading and trial and error; however, its worked for me so hopefully it helps you too.So I was originally on a windows machine running apache webserver and mysql (see first post). So aside from actually importing the dump file into a linux machine using the command line I am quite unfamiliar with the actual creating a dump file process using the command line. So if you are trying to create a dump file using a linux machine you should read the many articles/how-tos on google. However, from my brief encounter the process is very similar to the import command line except that the arrow ('<') points in the opposite direction ('>')... pointing to the actual dump (sql) file you are trying to create.Supposedly the process is the same using the mysql command line under a windows machine... however, I never successfully got it to work at least for me. However, I did find an easier solution... I installed mysql's WorkBench GUI. I used WorkBench to access and manipulate my database (at times), but more importantly to create my dump files. Note: I couldn't get my dump files to import into the database using WorkBench, for which I used the command line back then when I was working with the Windows machine.Anyhow, set up WorkBench using the proper connections to your database... the GUI is kind of separated into 3 columns, but on the third column (far right) you will see an option to "Manage Import/Export." Click on this. A new tab will open. You should be on the "Export to Disk" tab. Select (checkbox) the database you want to export... and then on the right side you should select the second radio button ("Export to Self-Contained File") and then browse to the folder you want the sql file to export to, and then click on the "Export" button at the bottom. When this finishes you should have a sql file in the folder you defined.I presume (haven't tried it), but you can use WorkBench to connect to any mysql database as long as the connection is successfully setup. So even if your database is on a linux machine you could use WorkBench on a Window computer to establish a connection with the database and to preform database tasks with a GUI instead of the command line.After switching to our new linux machine, we ended up setting up phpmyadmin (which is very similar but accessible from the web)... that is why we have not tried setting up WorkBench to work with our new databases. I'm kind of indifferent to allowing web access to my databases, just seems like more of a security risk, but everything works fine so I don't want to mess anything up. I'll probably end up tightening security on my phpmyadmin.HTH! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now