How to migrate Fresh Store Builder to New Server : Digital Ocean way


Limited Time Promo, Get Free $20 credit from Vultr, click the banner to get it.

In this era competition make everything better. Specially in hosting industry. I used to stick on provider host due to :

  1. Price (cheaper is better)
  2. Stability (good uptime is great)
  3. Fast network (low latency is one of signal I see).
  4. Good support (I love friendly and fast support).

Of course rare communication with support mean the service is great.

In this post I’ll show how to move Fresh Store Builder (FSB) from one host to another host. In this case I’ll move FSB I install on Vultr to Digital Ocean. (At the moment both provider give me good impression specially Digital Ocean that I use more than 1 year but Vultr also good since they backed up by Choopa who provide good online gaming infrastructure).

Lets get start migration process.

Create Droplet on Digital Ocean

I use closest location to UK (Vultr way). This time I choose Amsterdam.

fsb_do1

Ubuntu version also same 12.04 x64.

Register Server to ServerPilot

Login to ServerPilot and add the ip address.

Type command provided and everything handle by ServerPilot.

fsb_do2

All required software will be installed and ‘connected’ message is the only message confirm the status. Simple and smooth.

fsb_do3

Add Domain

This domain is domain / sub domain name that I want to migrate.

Click Apps->+Add App

fsb_do4

Add Database

This database will store database of old FSB

Click Databases-> + Create Database

fsb_do5

Write down name, user and password for database.

Testing App appearance

Before url working I already pointing ip address to ip address. In this case I use

http://store2.hostingformula.net/

fsb_do6

At this stage I already have :

  • Working new vps server at Digital Ocean
  • Working URL pointing to store2.hostingformula.net
  • Database for store Fresh Store Builder data.
  • Place where I can upload old FSB file (store.hostingformula.net)

Now I can continue to move the content.

Login to Vultr for creating FSB file + Database

Login to vultr using username and password created on 1st post (Easy VPS for FreshBuilder Store : Vultr Way).

$ ssh root@store.hostingformula.net
root@store.hostingformula.net’s password:
Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-63-generic x86_64)

* Documentation:  https://help.ubuntu.com/
Last login: Wed Jun  4 05:04:55 2014 from 180.242.4.45
# cd /srv/users/serverpilot/apps/store/public/
#

Dump MySQL database

Find username and password for dumping process :

# cat config/mysql.php
<?php
define(‘MYSQL_HOST’, ‘localhost’);
define(‘MYSQL_DATABASE’, ‘fsb’);
define(‘MYSQL_USERNAME’, ‘diYZdnqokwLwv’);
define(‘MYSQL_PASSWORD’, ‘ZdnqokwLwv’);
?>

Dump database

# mysqldump -udiYZdnqokwLwv -pZdnqokwLwv fsb > fsb.sql

See if the exist

# ls -l | grep sql
-rw-r–r– 1 root        root        12083607 Jun  5 05:58 fsb.sql
#

Yes. sql file is there.

Compress all the files into one tar.gz file.

# tar cvzf public.tar.gz public

# ls -l
total 15128
drwxr-xr-x 20 serverpilot serverpilot     4096 Jun  5 05:59 public
-rw-r–r–  1 root        root        15464208 Jun  5 06:02 public.tar.gz

Send the file to Digital Ocean.

# scp public.tar.gz root@store2.hostingformula.net:/srv/users/serverpilot/apps/store2
The authenticity of host ‘store2.hostingformula.net (80.240.129.53)’ can’t be established.
ECDSA key fingerprint is f2:fe:6d:b9:e9:7e:c0:ad:1b:58:75:17:51:3e:b6:e8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘store2.hostingformula.net,80.240.129.53’ (ECDSA) to the list of known hosts.
root@store2.hostingformula.net’s password:
public.tar.gz                                                                                                                         100%   15MB  14.8MB/s   00:01
#

Good. Time for deploy FSB on new server.

Deploy Fresh Store Builder on Digital Ocean Server

Login to Digital Ocean and go to /srv/users/serverpilot/apps/store2 folder.

# cd /srv/users/serverpilot/apps/store2/
# ls
public  public.tar.gz
# ls -l
total 15108
drwxr-xr-x 2 serverpilot serverpilot     4096 Jun  5 01:02 public
-rw-r–r– 1 root        root        15464208 Jun  5 02:04 public.tar.gz
# mv public public_old
# tar xvzf public.tar.gz

# ls -l
total 15112
drwxr-xr-x 20 serverpilot serverpilot     4096 Jun  5 01:59 public
-rw-r–r–  1 root        root        15464208 Jun  5 02:04 public.tar.gz
drwxr-xr-x  2 serverpilot serverpilot     4096 Jun  5 01:02 public_old
# rm public.tar.gz
# rm -rf public_old/
#

Import database

# cd public/
# ls
ajax  apitester.php  backups  changelog.txt  controllers  files.txt   fsb.sql        icons      images     library      logs  readme.txt  sitemap.xml  start  templates
api   autorun        cache    config         emails       freshadmin    image.php  index.php  license.txt  min   robots.txt  sitemaps     temp

# mysql -uHUQYJujmj2KZJ -p fsb2 < fsb.sql
Enter password:
#

Change mysql setting

# nano config/mysql.php

change database name, username and password and save the file.

Install Ion Cube Loader on Digital Ocean

Make sure to use proper loader ( For php 5.4 or php 5.5)

Delete Fresh Store Builder Cache

Login to freshadmin

Click Tools -> Delete Cache.

Visit the store 🙂

fsb_do7

Performance

Overall performance between store and store is no different.

Vultr and Digital Ocean deliver same result for me.

fsb_do8


Limited Time Promo, Get Free $20 credit from Vultr, click the banner to get it.