How to move a C5 site the super easy way with zero downtime on BlueHost for example.

Permalink
I'm pretty much a n00b at web stuff but after spending a lot of time figuring it out, there is an easier way that what has been presented imo.

1. change nameservers right now (they will take hours to switch anyways)

2. On your old host:
a. download ONLY: files/packages/themes folders using ftp program of choice
b. download sql database file

3. On your new host
a. install fresh blank C5 on new host (same version of C5 as on old host)
b. delete only 3 folders on new c5 install (files, packages, themes)
c. upload old host files, packages, themes folders to new host
d. delete fresh database files on new host so it is blank and then upload old host sql database files to new database

4. sit back and wait for the magic to happen.

5. when the nameservers make their change, delete files on old host.

no need to monkey around with the config file because you are using the config file that was automatically created in the fresh install.

View Replies:
Mnkras replied on at Permalink Reply
Mnkras
If you try and login you will not be able to login, as the salt is different, also if you have any overrides you will lose them, I do not suggest "moving" a site this way. I suggest using the instructions in the documentation.

Mike
admin replied on at Permalink Reply
well i can only speak for myself but moving it this way worked perfectly for me. no issues at all.
Mnkras replied on at Permalink Reply
Mnkras
A password is checked like so: md5(password:salt) The salt is randomly generated on each install. The only way to login is to reset the password.

Mike
admin replied on at Permalink Reply
so why can i login with no problems?
Mnkras replied on at Permalink Reply
Mnkras
Did you sign out then try and sign back in? it may have cached the cookie.
admin replied on at Permalink Reply
I have signed in/out multiple times, edited the site, connected to the c5 community, run the index, etc. Works fine for me.
Korvin replied on at Permalink Reply
Korvin
You need to make sure that you copy over the old config file, as the chances that your salt is the same is so infinitesimal that it's not realistic to count that as an option.

Also, the only reason why it takes so long for dns to switch is because it is cached on the user side, if, however, you clear your dns cache properly and try to access the site mere minutes after switching them, you'll be able to see the new site (There are tools called dns propagation checkers that confirm this, I use http://viewdns.info ). What this means is that all new users to your site, or users that haven't seen your site for awhile will see the new site, which won't be live. So it's imperative that you wait until everything is set up before switching. If you'd like to test out your server before switching the dns, set up your hosts file to point http://www.yoursite.com to your new servers IP address and clear your browser cache, this is no different than switching the dns, it's just not practical for production.

Please amend this guide to reflect these things so that people aren't misdirected when attempting to switch their sites.

-Edit
I didn't mention this, thank you for writing this guide, it's important that people don't have to reinvent the wheel every time they need to do something like this, again thanks.

Best wishes,
Korvin - Concrete5 core team
admin replied on at Permalink Reply
If you follow my instructions the old config file is not a part of this transfer.

Just posting how I did it, that is all.
Korvin replied on at Permalink Reply
Korvin
Right, it's not possible to transfer a concrete5 site without the config file and without resetting every password.
admin replied on at Permalink Reply
Ok :)
cscomputers replied on at Permalink Reply
Is it possible if he used the same passwords?

If not, isn't this a bit of a security concern for the system the fact that this has worked?

Paul
admin replied on at Permalink Reply
The login info is held in the SQL files so when that old database takes the place of the new blank one, the old logins should work on the new host until you decide to change them.
Korvin replied on at Permalink Reply
Korvin
No, there is no way that this can work, when you install concrete5, a config/site.php file is created that holds your password salt, without copying over that file, there is no way that any passwords will work. Period.
Korvin replied on at Permalink Reply
Korvin
If you copy over the files directory, it's possible to copy the sessions dir and have still active sessions, but there is no way to log in.
admin replied on at Permalink Reply
i guess you need to learn more about c5 then.
Mnkras replied on at Permalink Reply
Mnkras
@dermmedica who was that aimed at?
Korvin replied on at Permalink Reply
Korvin
Hey dermmedica,

Yes, I'd love to understand what you've been able to pull off here.

I've tested this out on a few different hosts but I haven't been able to replicate your result. What am I doing wrong?
In my tests I did the following:

1. Install first c5, add test user account, edit a few pages
2. Export the database from first c5 install
3. Install second c5, replace sql database with first c5 sql database
4. Replace second c5 files, packages, and themes folders with first c5 folder respectively.

After completing those steps, attempts to log in to either my test user account or my admin account resulted in incorrect password errors. Couldn't login at all.

Then, I copied over the first c5's config file and everything started working fine.

Is it possible you were coping the config file over as well as part of your move? That's the only way I could pull off what you're describing...

Curious....
djscax replied on at Permalink Reply
The suggested process worked fine for me, actually what I've done is to keep the new config/site.php and to save the new MySql table named 'Users' storing such info and then copying it into the Old DB after restorin it..
Worked perfectly :-) thank you
djscax replied on at Permalink Reply
The suggested process worked fine for me, actually what I've done is to keep the new config/site.php and to save the new MySql table named 'Users' storing such info and then copying it into the Old DB after restorin it..
Worked perfectly :-) thank you