Jump to content

Clone & Upgrade Prestashop - WHM / Cpanel Style Server - Wip tut!


Recommended Posts

The purpose of this thread is knowledge, on how to clone a live prestashop install. With this knowledge you will be able to move your prestashop site to any url that you wish. Once the move is complete we will be covering a proper upgrade process of your cloned website.


Note to mods - This is a work in progress and not complete. I will be covering the upgrade process as well as cloning prestashop that’s why I chose this forum.

Note to users - You may contribute your knowledge to this thread. Help is a wonderful thing!


Software needed
_________

Editors: Used to replace the 1000’s of url’s needed to successfully clone your prestashop website.
http://liquidninja.com/metapad/ Places .sql file into memory – Works great on small databases
http://notepad-plus-plus.org/ Does not place .sql file into memory – Great for big databases

Staggered MySQL Dump Importer: Used when memory is a problem on your server.
http://www.ozerov.de/bigdump.php

Differencing and merging tool: Used to compare different releases of prestashop for upgrade purposes.
http://winmerge.org/

SFTP, FTP and SCP client: Used to upload, download & set permissions on files & folders.
http://winscp.net/eng/index.php

____________

Example #1

I have two live sites at these url’s

http://www.mydomain.com = blogging software
http://store.mydomain.com = prestashop software

I have successfully moved the blogging software to http://www.mydomain.com/blog

Now I need to move prestashop to the main domain. I am on a whm/cpanel server so prestashop needs to live in the public_html folder.

Lets get started...

I am using metapad today to search and replace all the url’s in the database .sql of my shop. The database I will be working with is only 25 megs or so. Metapad can handle this size file because of my main windoze computer has 2-Gigs of memory and a dual core 3-Ghz processor. Any database bigger than this and you will need to use an editor like notepad++ because it doesn’t load the .sql file into your computers memory. Just remember the bigger the database the more url’s that need to be edited. You can count on at least a thousand url’s that need to be changed. I will give a tally on how many url’s I changed in my .sql file I am sure it will be a couple 1000.

I use big dump for the same reason (memory) on my server. Big dump will break the database.sql into sections and populate any new MySQL database in stages. By using bigdump you server wont choke over a memory issue while populating the new database on your server.

Today I am going to use phpMyAdmin from my cpanel to get a copy of my database. I have been struggling about which database dump to use. You see you can download the database in two different spots in cpanel. You can go to (files) then click on (backups) and download it or like I said use phpMyAdmin and download a copy.

What I find strange about downloading copies of the database in each spot are the different sizes of them. The cpanel dump is always smaller than the phpMyAdmin dump. I would love to here the reason why from one of you guys??? Anyway I am gonna take my database dump one step further in this example of cloning my website.

So lets begin. Go into phpMyAdmin from your cpanel and click on the database you want to clone. Don’t check anything all you need to do is click export at the top. By default in the next screen you should see all the tables highlighted in that export column! If you don’t see all the tables highlighted click on (select all). Now we need to make sure we export the database as a .sql file. Make sure the SQL is selected in the radio button below all the tables.

Now before you hit the go button at the bottom to export your database. I want you to uncheck the (Extended Inserts) box in the bottom right. Now go ahead a hit the go button at the bottom and download a copy of your database.

Step #2: Search and Replace,

Now that you have a sql dump of your database on your desktop, I want you to make a copy of it and store it in another folder. You will notice the name of your database will be your user login to cpanel and the name of the database. Something like this example: (mydomain_database.sql). I want you to change the name of the _database to your new database name. It should look like this example: (mydomain_newdatabase.sql). Now open up your mydomain_newdatabase.sql database dump from phpMyAdmin in metapad or notepad++ on your desktop.

At the top of the file you will see your old database name again in line 19. Lets change that to the new database name eg: mydomain_newdatabase do not put the .sql at the end of the file. Good now hit the save button and save your edited work.

Now we are going to search and replace all url's in the database. Everyone's search and replace will be a little different based on where you have prestshop installed at.

Find
http://www.mydomain.com
Replace All
http://www.mydomain.com/blog

Find
http://store.mydomain.com
Replace All
http://mydomain.com

This is a work in progress and not complete. I will finish some more on this tutorial tonight when I get off work. Last Edit: 4-13-11 6:11 am

  • Like 1
Link to comment
Share on other sites

You are making this way to complicated,

First download FileZilla at http://filezilla-project.org/ (Its FREE and SAFE I use it daily)

Second get it connected to your server no matter your server

Third say your files are in the document store (http://Store.mydomain.com)

Copy the files from that file to a temp. file on you desktop using FileZilla

Than using FileZilla get back to the Public directory and put the files there.

It is simple.

NOTE: when your in the Public_html directory make sure to unpack your shop in that file, For example if you download prestashop to your computer and unpack the zip file the actual shop is in a file called Prestashop if you move that file to your public_html file your shop url will be http://www.mydomain.com/prestashop and of course you can change that name to be something like store and your URL will be http://www.mydomain.com/store.


NEED MORE HELP JUST PM ME

Link to comment
Share on other sites

  • 4 years later...

Hello ,

        I have successfully ported my site from local host wamp server to a live server online and changed the required URL also but now when I open my site it shows "Index of" page and two folders one of which contains the website .It does not load  the index .php page directly . Please help me with this . I want my homepage to be directly loaded when my website is opened .

thank you in advance

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...