PhotoStore Documentation

Hosting Transfer - Moving the store to a new host

This FAQ applies to: Photostore (All version 4)
Foreword: This FAQ is a very general procedure for accomplishing Photostore site transfers. It will be impossible to address every issue that could possibly be encountered. It is always best to hire a qualified professional if you are unsure about anything.
The basic steps are as follows:
1) Perform backups of existing site including files and database
2) Create database on new hosting
3) Upload files and database to new hosting
Perform backups of existing site
There are two main things you need to backup. The files, and the database. Furthermore, lets look at the files as two groups. You have your "assets/library/" folder, and then the rest of the files on the site. Your assets/library/ holds all the media you have uploaded and will most likely use the most disk space, and this is why we talk about it seperately from the rest of the files.
NOTE! Make sure you get all of your assets/library/ directory. If you are backing up your site using FTP, make sure that your listing output is not truncated to 2000 files. You're probably scratching your head about now. Let me explain. Even though you may have 5000, or 7500 images, some FTP servers only show the first 2000 files in the directory. The way to check it is to enter the /assets/library/xxxxx/originals folder using your FTP client (xxxxx being a date, or sub directory within the library directory). If you see exactly 2000 files (or sometimes 1998 for reasons I'm not going to explain here), then the output is most likely truncated. Most FTP will report to you in the log that the listing of the directory has been truncated. You can either contact your host to change the configuration to allow more files to be seen (probably won't happen), or you can download the first 2000, delete them, and then download 2000 more. Continue this process until you get all the photos.
Backing up the files
There are two methods that will be discussed here, FTP (or SFTP) and SSH (or shell access). The preferred method is SSH, but most people will NOT have SSH access. Because of this, I will focus mainly on FTP and talk briefly about SSH at the end.
To backup your files using FTP, login to your site via FTP. There are many FTP clients, some work better than others. If you need an FTP client, please use a search engine and look at some reviews and find you a good FTP client program to use on our Operating System.
Once you login via FTP, navigate to the folder that contains your public html pages, normally called public_html (cpanel servers), httpdocs or htdocs (plesk), www, wwwroot, or many other names that are similar. First, enter the assets/library/xxxxxx/originals/ folder and check to see if your server output list is truncated to 2000 files (xxxxx being a sub directory usually named as a date of the upload of the media, you may have to check more than one folder to be sure there is no truncated directories). If not, go back to your public site root and download the entire contents to your computer. If the output is truncated, use the download, delete, download, delete method to get all of the photos, and then download the rest of the files.
SSH is preferred because you can copy the files directly from one server to the next. Additionally, file permissions are retained. SSH is not susceptible to the truncation problems that FTP has. I'm not going to get into too much detail. If your using SSH, you should know basically what your doing.
On the new server, execute a command similar to this:
rsync -avz --progress old_server_user@old_server_IP /path_on_new_server/
Alternative Backup:
Alternatively your hosting control panel (like for example cPanel) can offer you a way to backup your files. For example in cPanel you can use the backup area to actually backup the entire home directory, and some cPanel's will let you even back this up to the server you are moving to. For more on backing up your files contact your hosting provider.

Backup the database
You can use the data area of the store manager to get a backup of the store database.
Other method:
I'm only going to discuss using phpMyAdmin. There is ways to do it using SSH, but very rarely does this need to be done.
There are many ways to access your phpMyAdmin, but usually it is thru your web hosting control panel. If you don't know how to access phpMyAdmin, then ask your hosting company where it is. Once you launch the phpMyAdmin window, click on the database you wish to backup. Then click on "Export". Check the "Save as file" box (if needed, newer phpmyadmin don't do this any more), and click "Go". Save the file to your computer.

Now that you have everything backed up, go ahead and upload the entire store to new hosting. Then go into your new hosting control panel and setup a new database, take notes of the database name, database username, database password, and database host name. You will need these to reconnect your store to this new database. After you have created the new database go ahead and use the new hosting control panel and find the phpmyadmin area and then import your backed up database into the new database. Short explaination would be to click on the database, then click on "import" in the top menu. Then use the browser button to select your database back up file (.sql file). After you have done all that now use FTP again and log into your new hosting and go to assets/includes/db.config.php file and edit it. In there put in the new database name, database user name, database password, and database host name. Save the changes. Now the store should be working some what. One final thing would be to log into the manager and go to settings -> software setup and be sure the paths and install URL are correct for the new hosting setup.

Final Thought
Since all hosting are different and the methods can vary widely, it is recommended that you contact your new hosting company first, as they may offer a free service to move your existing site over for you. If you managed to get a backup of your database and site files and you are unsure how to setup/install them on the new site you will want to contact your new hosting company to see if they can help you or give you some articles on how to import that database backup, and files to the new site location.